[xiph-commits] r15172 - in trunk/subtle: . Subtle docs/html

jmesquita at svn.xiph.org jmesquita at svn.xiph.org
Fri Aug 8 18:48:27 PDT 2008


Author: jmesquita
Date: 2008-08-08 18:48:27 -0700 (Fri, 08 Aug 2008)
New Revision: 15172

Added:
   trunk/subtle/Subtle/Subtle.py
Removed:
   trunk/subtle/Subtle.py
Modified:
   trunk/subtle/docs/html/Subtle-module.html
   trunk/subtle/docs/html/Subtle-pysrc.html
   trunk/subtle/docs/html/api-objects.txt
   trunk/subtle/docs/html/class-tree.html
   trunk/subtle/docs/html/help.html
   trunk/subtle/docs/html/identifier-index.html
   trunk/subtle/docs/html/module-tree.html
   trunk/subtle/docs/html/redirect.html
   trunk/subtle/docs/html/toc-everything.html
   trunk/subtle/docs/html/toc.html
Log:
Generating docs again and doing the last move so that Subtle.py belongs to the Subtle package.

Added: trunk/subtle/Subtle/Subtle.py
===================================================================
--- trunk/subtle/Subtle/Subtle.py	                        (rev 0)
+++ trunk/subtle/Subtle/Subtle.py	2008-08-09 01:48:27 UTC (rev 15172)
@@ -0,0 +1,957 @@
+#!/usr/bin/env python
+#
+#       Subtle.py
+#       
+#       Copyright 2008 Joao Mesquita <jmesquita at gmail.com>
+#       
+#       This program is free software; you can redistribute it and/or modify
+#       it under the terms of the GNU General Public License as published by
+#       the Free Software Foundation; either version 3 of the License, or
+#       (at your option) any later version.
+#       
+#       This program is distributed in the hope that it will be useful,
+#       but WITHOUT ANY WARRANTY; without even the implied warranty of
+#       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#       GNU General Public License for more details.
+#       
+#       You should have received a copy of the GNU General Public License
+#       along with this program; if not, write to the Free Software
+#       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+#       MA 02110-1301, USA.
+
+# Std modules import
+import sys
+import os
+
+try:
+    import pygtk
+    #tell pyGTK, if possible, that we want GTKv2
+    pygtk.require("2.0")
+except ImportError:
+    print "You need to install PyGTK to run Subtle"
+    sys.exit(1)
+    
+try:
+    import gtk
+    import gobject
+    import gtk.glade
+except ImportError:
+    print "You need to install pyGTK or GTKv2"
+    sys.exit(1)
+
+try:
+    import gst
+except ImportError:
+    print "You need GStreamer python bindings to run Subtle"
+    sys.exit(1)
+
+# Subtle imports
+from GPlayer import VideoWidget
+from GPlayer import GstPlayer
+from Subtitles import Subtitles,Discoverer
+from MediaInfo import MediaInfo
+from SubtleXML import ProjectXML
+
+ONLINE_MODE = 1
+EDITING_MODE = 0
+
+class Subtle:
+    def __init__(self):
+        """
+        In this init we are going to display the main
+        Subtle window
+        """
+        gladefile="Subtle/subtle.glade"
+        windowname="MAIN_WINDOW"
+        
+        self.update_id = -1
+        self.p_position = gst.CLOCK_TIME_NONE
+        self.p_duration = gst.CLOCK_TIME_NONE
+        self.UPDATE_INTERVAL=100
+        
+        self.Subtitle = None
+        self.Subtitles = []
+        # Current subtitle being edited
+        self.cur_edit_sub_iter = None
+        #Current editing mode
+        ## Refer to globals for values
+        self.mode = ONLINE_MODE
+
+        #self.scroll = 0
+        self.videoWidgetGst = None
+        self.player = None
+        self.t_duration = 0
+        self.media = []
+
+        self.wTree=gtk.glade.XML(gladefile,windowname)
+        self.gladefile = gladefile
+        dic = { "gtk_main_quit" : (gtk.main_quit),\
+            "on_main_file_quit_activate": (gtk.main_quit), \
+            "on_main_file_open_activate": self.mainFileOpen, \
+            "on_TOOL_PLAY_clicked": self.playerPlay,\
+            "on_TOOL_STOP_clicked": self.playerStop,\
+            "on_TOOL_SM_clicked": self.playerSlowMotion,\
+            "on_TOOL_FF_clicked":self.playerFastForward,\
+            "on_TOOL_SEEK_FORWARD_clicked": self.playerSeekForward,\
+            "on_TOOL_SEEK_REWIND_clicked": self.playerSeekRewind,\
+            "on_TOOL_HIDE_STREAMS_clicked": self.cb_hideStreamsPane,\
+            "on_TOOL_HIDE_SUBLIST_clicked": self.cb_hideSubPane,\
+            "on_MEDIA_ADJUSTMENT_button_press_event": self.buttonPressAdjustment,\
+            "on_MEDIA_ADJUSTMENT_button_release_event": self.buttonReleaseAdjustment,\
+            "on_MEDIA_ADJUSTMENT_change_value": self.changeValueAdjustment,\
+            "on_VIDEO_OUT_PUT_expose_event": self.exposeEventVideoOut,\
+            "on_main_file_save_activate": self.cb_onSaveMenu,\
+            "on_main_file_save_as_activate": self.cb_onSaveAsMenu,\
+            "on_main_file_new_activate": self.cb_onNewMenu,\
+            "on_MAIN_VIEW_STREAMS_PANE_activate": self.cb_showStreamsPane,\
+            "on_MAIN_VIEW_SUBTITLES_activate": self.cb_showSubtitlePane,\
+            "on_TOOL_DEL_STREAM_clicked": self.cb_delStream,\
+            "on_TOOL_MOD_STREAM_clicked": self.cb_modStream,\
+            "on_TOOL_NEW_STREAM_clicked": self.cb_newStream,\
+            "on_TOOL_ADD_STREAM_clicked": self.cb_addNewStream,\
+            "on_LIST_SUBS_button_release_event": self.cb_onSubsListSelect,\
+            "on_LIST_SUBS_button_press_event": self.cb_onSubsListSelect,\
+            "on_txt_subedit_key_release_event": self.cb_onSubtitleEdit,\
+            "on_tgl_mode_toggled": self.cb_onModeChanged,\
+            "on_TOOL_SAVE_STREAM_clicked": self.cb_saveStream,\
+            "on_TOOL_DEL_SUBS_clicked": self.cb_subDel,\
+            "on_TOOL_OUT_SUB_clicked": self.cb_subOut,\
+            "on_TOOL_IN_SUB_clicked": self.cb_subIn,\
+            "on_TOOL_INS_B4_SUB_clicked": self.cb_onSubInsB4,\
+            "on_TOOL_INS_AFTER_SUB_clicked": self.cb_onSubInsAfter,\
+            "on_TOOL_IN_SUB_clicked": self.cb_subIn}
+        self.wTree.signal_autoconnect (dic)
+        
+        self.windowMainWindow=self.wTree.get_widget("MAIN_WINDOW")
+        self.windowProjectOpen=None
+        self.windowProjectSO=None
+        self.windowNewSubFile=None
+        self.PFileName=None
+        self.windowMediaOpen=None
+        #self.windowStreams=gtk.glade.XML (self.gladefile,"STREAM_WINDOW")
+        #dic = {"on_TOOL_DEL_STREAM_clicked": self.cb_delStream,\
+        #        "on_TOOL_MOD_STREAM_clicked": self.cb_modStream,\
+        #        "on_TOOL_NEW_STREAM_clicked": self.cb_newStream,\
+        #        "on_TOOL_ADD_STREAM_clicked": self.cb_addNewStream,\
+        #        "on_STREAM_WINDOW_delete_event": self.cb_StreamWindowDelete}
+        #self.windowStreams.signal_autoconnect (dic)
+        ### Setup LIST_STREAMS
+        #LIST = self.windowStreams.get_widget("LIST_STREAMS")
+        LIST = self.wTree.get_widget("LIST_STREAMS")
+        if LIST:
+            self.streamsTreeStore = gtk.TreeStore(gobject.TYPE_STRING, gobject.TYPE_UINT)
+            LIST.set_model(self.streamsTreeStore)
+            cell = gtk.CellRendererText()
+            tvcolumn = gtk.TreeViewColumn('Streams', cell, text = 0)
+            LIST.append_column(tvcolumn)
+        
+        #self.windowSubsList=gtk.glade.XML (self.gladefile,"SUBS_LIST")
+        #dic = {"on_LIST_SUBS_cursor_changed": self.cb_onSubsListSelect,\
+        #        "on_TOOL_SAVE_STREAM_clicked": self.cb_saveStream,\
+        #        "on_TOOL_DEL_SUBS_clicked": self.cb_subDel,\
+        #        "on_TOOL_OUT_SUB_clicked": self.cb_subOut,\
+        #        "on_TOOL_IN_SUB_clicked": self.cb_subIn,\
+        #        "on_TOOL_INS_B4_SUB_clicked": self.cb_onSubInsB4,\
+        #        "on_TOOL_INS_AFTER_SUB_clicked": self.cb_onSubInsAfter,\
+        #        "on_TOOL_IN_SUB_clicked": self.cb_subIn,\
+        #        "on_SUBS_LIST_delete_event": self.cb_onSubsWindowDelete}
+        #self.windowSubsList.signal_autoconnect (dic)
+        #SUBLIST = self.windowSubsList.get_widget("LIST_SUBS")
+        SUBLIST = self.wTree.get_widget("LIST_SUBS")
+        SUBLIST.add_events(gtk.gdk._2BUTTON_PRESS)
+        if SUBLIST:
+            self.subsListStore = gtk.ListStore(gobject.TYPE_UINT,
+                                                gobject.TYPE_UINT,
+                                                gobject.TYPE_UINT,
+                                                gobject.TYPE_UINT,
+                                                gobject.TYPE_UINT,
+                                                gobject.TYPE_STRING)
+            SUBLIST.set_model(self.subsListStore)
+            cell = gtk.CellRendererText()
+            tvcolumn = gtk.TreeViewColumn('#', cell, text = 0)
+            SUBLIST.append_column(tvcolumn)
+            cell = gtk.CellRendererText()
+            tvcolumn = gtk.TreeViewColumn('Start Time', cell, text = 1)
+            SUBLIST.append_column(tvcolumn)
+            cell = gtk.CellRendererText()
+            tvcolumn = gtk.TreeViewColumn('End Time', cell, text = 2)
+            SUBLIST.append_column(tvcolumn)
+            cell = gtk.CellRendererText()
+            tvcolumn = gtk.TreeViewColumn('Start Frame', cell, text = 3)
+            SUBLIST.append_column(tvcolumn)
+            cell = gtk.CellRendererText()
+            tvcolumn = gtk.TreeViewColumn('End Frame', cell, text = 4)
+            SUBLIST.append_column(tvcolumn)
+            cell = gtk.CellRendererText()
+            tvcolumn = gtk.TreeViewColumn('Text', cell, text = 5)
+            tvcolumn.set_resizable(True)
+            SUBLIST.append_column(tvcolumn)
+        #WND=self.windowStreams.get_widget("STREAM_WINDOW")
+        #WND.hide()
+        #WND=self.windowSubsList.get_widget("SUBS_LIST")
+        #WND.hide()
+        ### Main window setup
+        self.videoWidget = self.wTree.get_widget("VIDEO_OUT_PUT")
+        self.adjustment = self.wTree.get_widget("MEDIA_ADJUSTMENT")
+        self.labelHour = self.wTree.get_widget("LABEL_HOUR")
+        self.labelMin = self.wTree.get_widget("LABEL_MIN")
+        self.labelSec = self.wTree.get_widget("LABEL_SEC")
+        self.labelMSec = self.wTree.get_widget("LABEL_MSEC")
+        self.playButton = self.wTree.get_widget("TOOL_PLAY")
+        self.lbl_cur_fps = self.wTree.get_widget("lbl_cur_fps")
+        self.streams_pane = self.wTree.get_widget("streams_pane")
+        self.subtitle_pane = self.wTree.get_widget("subtitle_pane")
+        self.txt_subedit = self.wTree.get_widget("txt_subedit")
+        self.tgl_mode = self.wTree.get_widget("tgl_mode")
+        self.spin_seek_value = self.wTree.get_widget("spin_seek_value")
+        self.subList = SUBLIST
+        #self.windowMainWindow.maximize()
+        return
+
+    def cb_onModeChanged(self, widget):
+        """
+            Change from online mode to editing mode
+            and vice versa
+        """
+        # Online mode
+        if self.tgl_mode.get_active():
+            self.mode = ONLINE_MODE
+            self.txt_subedit.set_sensitive(False)
+            return
+        # Editing mode
+        else:
+            self.mode = EDITING_MODE
+            self.txt_subedit.set_sensitive(True)
+            return
+
+
+    def cb_hideSubPane(self, widget):
+        """
+            Hide the subtitles pane
+        """
+        self.subtitle_pane.hide()
+        return
+
+
+    def cb_hideStreamsPane(self, widget):
+        """
+            Hide the streams pane
+        """
+        self.streams_pane.hide()
+        return
+
+
+    def cb_showStreamsPane(self, widget):
+        """
+            Hide the streams pane
+        """
+        self.streams_pane.show()
+        return
+
+
+    def cb_onSubInsB4(self, widget):
+        """
+            Insert new subtitle before current selected
+        """
+        subsList = self.wTree.get_widget("LIST_SUBS")
+        selection = subsList.get_selection()
+        result = selection.get_selected()
+        if result:
+            model, iter = result
+            if self.subsListStore.iter_is_valid(iter):
+                cur, sTime, eTime = self.subsListStore.get(iter, 0, 1, 2)
+                self.Subtitle.subAdd(sTime-1,sTime-2,'',None,1)
+                self.subsListStore.insert_before(iter, (cur, sTime-1, sTime-2,\
+                                                    'New subtitle...'))
+                self.reorder_SubsListStore()
+        return
+
+
+    def cb_onSubInsAfter(self, widget):
+        """
+            Insert new subtitle after current selected
+        """
+        subsList = self.wTree.get_widget("LIST_SUBS")
+        selection = subsList.get_selection()
+        result = selection.get_selected()
+        if result:
+            model, iter = result
+            if self.subsListStore.iter_is_valid(iter):
+                cur, sTime, eTime = self.subsListStore.get(iter, 0, 1, 2)
+                self.Subtitle.subAdd(eTime+1,eTime+2,'',None,1)
+                cur += 1
+                self.subsListStore.insert_after(iter, (cur, eTime+1, eTime+2,\
+                                                        'New subtitle...'))
+                self.reorder_SubsListStore()
+        return
+
+
+    def reorder_SubsListStore(self):
+        """
+            Reorder the subs listStore when added or deleted
+        """
+        iter = self.subsListStore.get_iter_first()
+        cur = 0
+        while iter is not None:
+            if iter is not None:
+                self.subsListStore.set_value(iter, 0, cur)
+                cur += 1
+                iter = self.subsListStore.iter_next(iter)
+
+
+    def cb_subDel(self, widget):
+        """
+            Delete a subtile from the list store and from memory
+        """
+        subsList = self.wTree.get_widget("LIST_SUBS")
+        selection = subsList.get_selection()
+        result = selection.get_selected()
+        if result:
+            model, iter = result
+            subKey = self.subsListStore.get(iter, 1)
+            self.Subtitle.subDel(subKey[0])
+            model.remove(iter)
+            self.reorder_SubsListStore()
+
+
+    def cb_subOut(self, widget):
+        """
+            Set subtitle endtime
+        """
+        if self.player:
+            subsList = self.windowSubsList.get_widget("LIST_SUBS")
+            selection = subsList.get_selection()
+            result = selection.get_selected()
+            if result:
+                model, iter = result
+                subKey, end_time = self.subsListStore.get(iter, 1, 2)
+                try:
+                    self.Subtitle.getSub(subKey).end_time = self.p_position/1000000
+                    self.Subtitle.subUpdate(subKey)
+                except:
+                    print "Error while setting subtitle timecode"
+                    return
+                self.subsListStore.set(iter,2,self.p_position/1000000)
+        return True
+
+
+    def cb_subIn(self, widget):
+        """
+            Set subtitle start time
+        """
+        if self.player:
+            subsList = self.windowSubsList.get_widget("LIST_SUBS")
+            selection = subsList.get_selection()
+            result = selection.get_selected()
+            if result:
+                model, iter = result
+                subKey = self.subsListStore.get(iter, 1)
+                try:
+                    self.Subtitle.getSub(subKey[0]).start_time = self.p_position/1000000
+                    self.Subtitle.subUpdate(subKey[0])
+                except:
+                    print "Error while setting subtitle timecode"
+                    return
+                self.subsListStore.set(iter,1,self.p_position/1000000)
+        return True
+
+
+    def cb_onSubsWindowDelete(self, widget, event):
+        widget.hide()
+        return True
+
+
+    def cb_StreamWindowDelete(self, widget, event):
+        widget.hide()
+        return True
+
+
+    def cb_onSubtitleWindow(self, menu):
+        if self.windowSubsList:
+            WND=self.windowSubsList.get_widget("SUBS_LIST")
+            WND.show()
+
+
+    def cb_showSubtitlePane(self, menu):
+        """
+           Show subtitle pane
+        """
+        self.subtitle_pane.show()
+
+    def getSubtitle(self, source):
+        for i in self.Subtitles:
+            if i.subSource==source:
+                return i
+        return None
+
+
+    def cb_saveStream(self, widget):
+        """
+            Save a stream. This will be renamed to cb_saveSub
+            since we don't offer video editting (yet)
+        """
+        #TODO: This is broken. How about implementing it correctly?
+        TView = self.windowStreams.get_widget("LIST_STREAMS")
+        TSelec = TView.get_selection()
+        TModel, TIter = TSelec.get_selected()
+        if not TIter:
+            return
+        N=TModel.get_value(TIter, 1)
+        mInfo = self.media[N]
+        if "subtitle" in mInfo.MIME:
+            tSubtitle = self.getSubtitle(mInfo.Streams[0].ID)
+            tSubtitle.subSave(mInfo.source, 1)
+
+
+    def cb_modStream(self, widget):
+        # We have removed the window
+        #if not self.windowStreams:
+        #    return
+        if not self.streamsTreeStore:
+            return
+        #TView = self.windowStreams.get_widget("LIST_STREAMS")
+        TView = self.wTree.get_widget("LIST_STREAMS")
+        TSelec = TView.get_selection()
+        TModel, TIter = TSelec.get_selected()
+        if not TIter:
+            return
+        N=TModel.get_value(TIter, 0)
+        # FIXME: We should actually get the selected subtitle
+        if "Subtitle" in N:
+            self.setSubtitle()
+
+
+    def cb_newStream(self, widget):
+        """
+           Create a new subtitle
+        """
+        #TODO: Lets popup something that will let us choose sub type
+        if(self.windowNewSubFile==None):
+            self.windowNewSubFile=gtk.glade.XML (self.gladefile,"NEW_SUBTITLE")
+            #dic={"on_OPEN_BUTTON_CANCEL_clicked": self.cb_openMediaCancel,\
+            #    "on_OPEN_BUTTON_OPEN_clicked": self.cb_openMediaOpen }
+            #self.windowMediaOpen.signal_autoconnect(dic)
+            WND=self.windowNewSubFile.get_widget("NEW_SUBTITLE")
+            WND.show()
+        else:
+            WND=self.windowNewSubFile.get_widget("NEW_SUBTITLE")
+            if not WND:
+                self.windowNewSubFile=None
+            else:
+                WND.show()
+        return
+
+
+    def setSubtitle(self):
+        if self.Subtitle:
+            # We have removed the window for now
+            #if (self.windowStreams):
+            #    WND=self.windowSubsList.get_widget("SUBS_LIST")
+            #    WND.show()
+            self.subsWindowUpdate()
+
+
+    def updateStreamWindow(self):
+        #FIXME: This should be more complete and better handled
+        # Maybe all streams must be on the same list/dict
+        if not self.streamsTreeStore:
+            return
+        self.streamsTreeStore.clear()
+        for sub in self.Subtitles:
+            iter = self.streamsTreeStore.append(None)
+            self.streamsTreeStore.set(iter, 0, "Subtitle: "+ sub.filename, 1, self.Subtitles.index(sub))
+            child = self.streamsTreeStore.append(iter)
+            self.streamsTreeStore.set(child, 0, "Type: " + sub.subType, \
+                    1, self.Subtitles.index(sub))
+            child = self.streamsTreeStore.append(iter)
+            self.streamsTreeStore.set(child, 0, "Encoding: " + sub.encoding, \
+                    1, self.Subtitles.index(sub))
+        for mInfo in self.media:
+            iter = self.streamsTreeStore.append(None)
+            self.streamsTreeStore.set(iter, 0, mInfo.source, 1, self.media.index(mInfo))
+            if mInfo.has_video:
+                child = self.streamsTreeStore.append(iter)
+                self.streamsTreeStore.set(child, 0, "Mimetype: " + mInfo.MIME.split("/")[1], \
+                        1, self.media.index(mInfo))
+                child = self.streamsTreeStore.append(iter)
+                self.streamsTreeStore.set(child, 0, "Resolution: %dx%d "% (mInfo.videoWidth, mInfo.videoHeight), \
+                        1, self.media.index(mInfo))
+                child = self.streamsTreeStore.append(iter)
+                self.streamsTreeStore.set(child, 0, ("Framerate: %.2f" % mInfo.framerate), \
+                        1, self.media.index(mInfo))
+                child = self.streamsTreeStore.append(iter)
+                self.streamsTreeStore.set(child, 0, ("Length: %s s" % mInfo.videoLengthS), \
+                        1, self.media.index(mInfo))
+                child = self.streamsTreeStore.append(iter)
+                self.streamsTreeStore.set(child, 0, ("Frames: %d" % (mInfo.videoLengthS/(1/mInfo.framerate))), \
+                        1, self.media.index(mInfo))
+                child = self.streamsTreeStore.append(iter)
+
+
+    def cb_delStream(self, widget):
+        """
+            Remove a stream from the current project
+        """
+        #FIXME: We broke this ...
+        if not self.windowStreams:
+            return
+        if not self.streamsTreeStore:
+            return
+        TView = self.windowStreams.get_widget("LIST_STREAMS")
+        TSelec = TView.get_selection()
+        TModel, TIter = TSelec.get_selected()
+        if not TIter:
+            return
+        N=TModel.get_value(TIter, 1)
+        self.updateStreamWindow()
+
+
+    def cb_openMediaCancel(self, widget):
+        if self.windowMediaOpen:
+            WND=self.windowMediaOpen.get_widget("OPEN_MEDIA")
+            WND.hide()
+
+
+    def cb_openMediaOpen(self, widget):
+        """
+            Callback to open a file
+            We do not add filters here because we
+            want to make subtle as dynamic as possible
+            and the number of supported files is too big and
+            sometimes not extensions based
+        """
+        WND=self.windowMediaOpen.get_widget("OPEN_MEDIA")
+        FN=WND.get_filename()
+        URI=WND.get_uri()
+        self.TEST_SUB_URI = URI
+        WND.hide()
+
+        tmpSub = Discoverer.discoverer(FN)
+        if tmpSub:
+            self.Subtitle = tmpSub
+            self.Subtitles.append(tmpSub)
+            self.updateStreamWindow()
+        else:
+            MI = MediaInfo(FN, URI)
+            # Lets poll for information
+            gobject.timeout_add(30, self.addMedia, MI)
+    
+    def addMedia(self, mInfo):
+        """
+            This is polled untill a media file discover process
+            has ended. When it has, throw error to the user if not
+            supported.
+        """
+        if not mInfo:
+            return
+        # First, wait for media discovery 
+        if mInfo.poll():
+            return True 
+        mInfo = mInfo.getMedia()
+        if mInfo.MIME:
+            # Set the subtitle framerate
+            if self.Subtitle:
+                self.Subtitle.framerate = mInfo.framerate
+            self.media.append(mInfo)
+            self.updateStreamWindow()
+            #Set videoWidget sizes according to media standards
+            self.videoWidget.set_size_request(mInfo.videoWidth, \
+                                                mInfo.videoHeight)
+            self.videoWidgetGst=VideoWidget(self.videoWidget)
+            self.player=GstPlayer(self.videoWidgetGst)
+            self.player.set_location("file://"+mInfo.source)
+            if self.videoWidget.flags() & gtk.REALIZED:
+                self.play_toggled()
+            else:
+                self.videoWidget.connect_after('realize',
+                                           lambda *x: self.play_toggled())
+        else:
+            errorDialog = gtk.MessageDialog(self.windowMainWindow, \
+                                            gtk.DIALOG_MODAL, \
+                                            gtk.MESSAGE_ERROR, \
+                                            gtk.BUTTONS_CLOSE, \
+                                            "This file format is not supported \
+                                            or not detected.")
+            result = errorDialog.run()
+            if (result == gtk.RESPONSE_CLOSE):
+                errorDialog.destroy()
+        return
+
+
+    def cb_addNewStream(self, widget):
+        if(self.windowMediaOpen==None):
+            self.windowMediaOpen=gtk.glade.XML (self.gladefile,"OPEN_MEDIA")
+            dic={"on_OPEN_BUTTON_CANCEL_clicked": self.cb_openMediaCancel,\
+                "on_OPEN_BUTTON_OPEN_clicked": self.cb_openMediaOpen }
+            self.windowMediaOpen.signal_autoconnect(dic)
+        else:
+            WND=self.windowMediaOpen.get_widget("OPEN_MEDIA")
+            if not WND:
+                self.windowMediaOpen=None
+            else:
+                WND.show()
+        return
+
+
+    def cb_onNewMenu(self, menu):
+        if self.windowStreams:
+            WND=self.windowStreams.get_widget("STREAM_WINDOW")
+            WND.show()
+
+
+    def cb_onSubsListSelect(self, widget, event):
+        """
+            Do the proper thing when subtitle is selected
+            2 clicks seeks de video to its timecode
+            1 click edits on the TextView
+        """
+        #FIXME: Something nasty happens on the selection of the subtitle
+        # Only happens the first time and throws an exception
+        Row=None
+        Selection = widget.get_selection()
+        if Selection==None:
+            return
+        Model, Rows = Selection.get_selected_rows()
+        if Rows != None:
+            #FIXME: Buggy solution!! Has something to do with
+            # button press release event generated...
+            Row = Model[Rows[0][0]]
+            if self.Subtitle:
+                Sub = self.Subtitle.subs[Row[1]]
+        if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
+            if self.player:
+                B=0;
+                self.player.set_subtitle_text(Sub.getSubText())
+                if self.player.is_playing():
+                    B=1
+                    self.play_toggled()
+                real = long(Row[1]) # in ns
+                self.player.seek(real*1000000)
+                # allow for a preroll
+                self.player.get_state(timeout=50*gst.MSECOND) # 50 ms
+                if B==1:
+                    self.play_toggled()
+        if event.type == gtk.gdk.BUTTON_RELEASE:
+            model, self.cur_edit_sub_iter =  Selection.get_selected() 
+            self.setSubtitleEdit( Sub.getSubText() )
+
+
+    def cb_onSubTextEdited(self, cell, path, new_text):
+        """
+            Callback to change subtitle when subtitle text was changed
+        """
+        iter = self.subsListStore.get_iter(path)
+        subKey, ETime, Text = self.subsListStore.get(iter, 1, 2, 3)
+        subtitle = self.Subtitle.getSub(subKey)
+        if subtitle.text != new_text:
+            subAttr = subtitle.Attributes
+            self.Subtitle.subDel(subKey)
+            self.Subtitle.subAdd(subKey,ETime,new_text,subAttr,1)
+            self.subsListStore.set(iter,3,new_text)
+
+        return True
+
+
+    def cb_onSubtitleEdit(self, widget, event):
+        """
+            Updates the subtile list in realtime
+        """
+        id, subKey, ETime = self.subsListStore.get(self.cur_edit_sub_iter, 0, 1, 2)
+        #self.Subtitle.subDel(subKey)
+        text = self.txt_subedit.get_buffer().get_property('text')
+        self.Subtitle.updateText(subKey,text)
+        #self.Subtitle.subAdd(subKey,ETime,text,None,0)
+        self.subsListStore.set(self.cur_edit_sub_iter, 3, text) 
+        return
+
+
+    def setSubtitleEdit(self,sub):
+        """
+            Set the subtitle to be edited
+        """
+        buf = self.txt_subedit.get_buffer()
+        buf.set_text(sub)
+
+
+    def subsWindowUpdate(self):
+        if not self.Subtitle:
+            return
+        # We have removed the window for now
+        #if self.windowSubsList:
+        self.subsListStore.clear()
+        j=0
+        for i in self.Subtitle.subKeys:
+            S=self.Subtitle.subs[i]
+            iter = self.subsListStore.append(None)
+            self.subsListStore.set(iter,0, j, 
+                                        1, int(S.start_time),
+                                        2, int(S.end_time),
+                                        3, int(S.start_frame),
+                                        4, int(S.end_frame),
+                                        5, str(S.getSubText()))
+            j +=1
+
+
+    def saveProject(self):
+        if not self.PFileName:
+            return
+        if self.PFileName[-4:]!=".spf":
+            self.PFileName=self.PFileName+".spf"
+        PXML=ProjectXML()
+        PXML.addHeadInfo("title", "Subtle development version")
+        PXML.addHeadInfo("desc", "This is version current at development stage.")
+        PXML.addHeadInfo("author", "Joao Mesquita")
+        PXML.addHeadInfo("email", "jmesquita at gmail.com")
+        PXML.addHeadInfo("info", "Sample of save function")
+        for i in self.media:
+            PXML.addMedia(i)
+        for i in self.Subtitles:
+            PXML.addSubtitle(i)
+        PXML.write(self.PFileName)
+
+
+    def cb_projectSaveOpen(self, widget):
+        WND=self.windowProjectSO.get_widget("SAVE_OPEN_PFILE")
+        self.PFileName=WND.get_filename()
+        self.saveProject()
+        WND.hide()
+
+
+    def cb_projectSaveCancel(self, widget):
+        if(self.windowProjectSO==None): return
+        WND=self.windowProjectSO.get_widget("SAVE_OPEN_PFILE")
+        WND.hide()
+
+
+    def cb_onSaveAsMenu(self, widget):
+        self.PFileName=None
+        self.cb_onSaveMenu(widget)
+
+
+    def cb_onSaveMenu(self, widget):
+        if self.PFileName:
+            self.saveProject()
+            return
+        if(self.windowProjectSO==None):
+            self.windowProjectSO=gtk.glade.XML (self.gladefile,"SAVE_OPEN_PFILE")
+            dic={"on_PROJECT_BUTTON_CANCEL_clicked": self.cb_projectSaveCancel,\
+                "on_PROJECT_BUTTON_OK_clicked": self.cb_projectSaveOpen }
+            self.windowProjectSO.signal_autoconnect(dic)
+            WND=self.windowProjectSO.get_widget("SAVE_OPEN_PFILE")
+            WND.set_action(gtk.FILE_CHOOSER_ACTION_SAVE)
+            OKB = self.windowProjectSO.get_widget("PROJECT_BUTTON_OK")
+            OKB.set_label("gtk-save")
+            OKB.set_use_stock(True)
+            Filter=gtk.FileFilter()
+            Filter.set_name("Subtle project file")
+            Filter.add_pattern("*.spf")
+            WND.add_filter(Filter)
+        else:
+            WND=self.windowProjectSO.get_widget("SAVE_OPEN_PFILE")
+            if(WND==None):
+                self.windowProjectSO=None
+                self.cb_onSaveMenu(widget)
+            else:
+                WND.show()
+
+
+    def cb_setSubStartTime(self, widget):
+        self.subStartTime.set_value(self.p_position/1000000)
+
+
+    def cb_setSubEndTime(self, widget):
+        self.subEndTime.set_value(self.p_position/1000000)
+
+
+    def setSubStartTime(self, time):
+        self.subStartTime.set_value(time)
+
+
+    def setSubEndTime(self, time):
+        self.subEndTime.set_value(time)
+
+
+    def exposeEventVideoOut(self, widget, event):
+        if self.videoWidgetGst:
+            self.videoWidgetGst.do_expose_event(event)
+
+
+    def changeValueAdjustment(self, widget, t1, t2):
+        #if (not self.scroll):
+            real = long(self.adjustment.get_value()) # in ns
+            self.player.seek(real)
+            # allow for a preroll
+            self.player.get_state(timeout=50*gst.MSECOND) # 50 ms
+
+
+    def buttonReleaseAdjustment(self, widget, event):
+        self.scroll=0
+
+
+    def buttonPressAdjustment(self, widget, event):
+        self.scroll=1
+
+
+    def playerStop(self, widget):
+        if self.player:
+            if self.player.is_playing():
+                self.play_toggled()
+            self.player.stop()
+
+
+    def playerPlay(self, widget):
+        if self.player:
+            self.play_toggled()
+
+
+    def playerSlowMotion(self, widget):
+        """
+            Put the current playing video in slow motion
+        """
+        self.player.slow_motion()
+        self.playButton.set_stock_id(gtk.STOCK_MEDIA_PLAY)
+        pass
+
+
+    def playerFastForward(self, widget):
+        """
+            Put the current playing video in FastForward 
+        """
+        self.player.fast_forward()
+        self.playButton.set_stock_id(gtk.STOCK_MEDIA_PLAY)
+        pass
+
+
+    def playerSeekForward(self, widget):
+        """
+            Jump some time or frames (depends on the subtitle format 
+            we are using) beyond current position
+        """
+        # TODO: Here we have to add support for more subtitle formats
+        cur_position = self.player.query_position()[0]
+        next_position = cur_position + ( self.spin_seek_value.get_value_as_int()*1000000000 )
+        self.player.seek(next_position)
+        self.update_scale_cb()
+        return
+
+
+    def playerSeekRewind(self, widget):
+        """
+            Jump back some time or frames (depends on the subtitle format
+            we are using)
+        """
+        # TODO: Here we have to add support for more subtitle formats
+        cur_position = self.player.query_position()[0]
+        next_position = cur_position - ( self.spin_seek_value.get_value_as_int()*1000000000 )
+        self.player.seek(next_position)
+        self.update_scale_cb()
+        return
+
+
+    def mainFileOpen(self, widget):
+        if(self.windowProjectOpen==None):
+            self.windowProjectOpen=gtk.glade.XML (self.gladefile,"SAVE_OPEN_PFILE")
+            dic={"on_PROJECT_BUTTON_CANCEL_clicked": self.openFileCancel,\
+                "on_PROJECT_BUTTON_OK_clicked": self.openFileOpen }
+            self.windowProjectOpen.signal_autoconnect(dic)
+            WND=self.windowProjectOpen.get_widget("SAVE_OPEN_PFILE")
+            WND.set_action(gtk.FILE_CHOOSER_ACTION_OPEN)
+            OKB = self.windowProjectOpen.get_widget("PROJECT_BUTTON_OK")
+            OKB.set_label("gtk-open")
+            OKB.set_use_stock(True)
+            Filter=gtk.FileFilter()
+            Filter.set_name("Subtle project file")
+            Filter.add_pattern("*.spf")
+            WND.add_filter(Filter)
+        else:
+            WND=self.windowProjectOpen.get_widget("SAVE_OPEN_PFILE")
+            if(WND==None):
+                self.windowProjectOpen=None
+                self.mainFileOpen(widget)
+            else:
+                WND.show()
+        return
+
+
+    def openFileCancel(self, widget):
+        if(self.windowProjectOpen==None): return
+        WND=self.windowProjectOpen.get_widget("SAVE_OPEN_PFILE")
+        WND.hide()
+        return
+
+
+    def openFileOpen(self, widget):
+        WND=self.windowProjectOpen.get_widget("SAVE_OPEN_PFILE")
+        self.PFileName=WND.get_filename()
+        WND.hide()
+        PXML=ProjectXML()
+        PXML.load(self.PFileName)
+        for i in PXML.getMedia():
+            self.addMedia(i)
+        self.Subtitles=[]
+        for i in PXML.getSubtitle():
+            self.Subtitles.append(i)
+        if len(self.media)>0:
+            WND=self.windowStreams.get_widget("STREAM_WINDOW")
+            WND.show()
+        return
+
+    def play_toggled(self):
+        if self.player.is_playing():
+            if self.player.get_rate() != 1.0:
+                self.player.play()
+                self.playButton.set_stock_id(gtk.STOCK_MEDIA_PAUSE)
+            else:
+                self.player.pause()
+                self.playButton.set_stock_id(gtk.STOCK_MEDIA_PLAY)
+                if gobject.source_remove(self.update_id):
+                        self.update_id = -1
+        else:
+            self.player.play()
+            if self.update_id == -1:
+                self.update_id = gobject.timeout_add(self.UPDATE_INTERVAL,
+                                                     self.update_scale_cb)
+            self.playButton.set_stock_id(gtk.STOCK_MEDIA_PAUSE)
+
+
+    def update_scale_cb(self):
+        self.p_position, self.p_duration = self.player.query_position()
+        if self.p_duration != self.t_duration:
+            self.t_duration = self.p_duration
+            self.adjustment.set_range(0, self.t_duration)
+        tmSec= self.p_position/1000000
+        MSec = tmSec
+        tmSec = tmSec/1000
+        Sec = tmSec%60
+        tmSec = tmSec/60
+        Min = tmSec%60
+        Hour = tmSec/60
+        if self.Subtitle:
+            TText = self.Subtitle.getSub(MSec)
+            if self.player.is_playing():
+                if TText:
+                    self.player.set_subtitle_text( TText.getSubText() )
+                    # Select current playing subtitle
+                    if self.mode == ONLINE_MODE:
+                        Selection = self.subList.get_selection() 
+                        #FIXME: This sometimes bugs ... Why??
+                        Selection.select_path(TText.number-1)
+                        self.setSubtitleEdit( TText.getSubText() )
+                else:
+                    self.player.set_subtitle_text('')
+                    if self.mode == ONLINE_MODE:
+                        self.setSubtitleEdit('')
+                        # Unselect what is not being played
+                        Selection = self.subList.get_selection()
+                        if Selection:
+                            Selection.unselect_all()
+        if (self.p_position != gst.CLOCK_TIME_NONE):# and (not self.scroll):
+            value = self.p_position
+            self.adjustment.set_value(value)
+        self.labelHour.set_text("%02d"%Hour)
+        self.labelMin.set_text("%02d"%Min)
+        self.labelSec.set_text("%02d"%Sec)
+        #FIXME: We are not displaying this correctly
+        self.labelMSec.set_text("%09d"%MSec)
+        self.lbl_cur_fps.set_text("%04d"%(self.player.query_frame(self.p_position)))
+        return True

Deleted: trunk/subtle/Subtle.py
===================================================================
--- trunk/subtle/Subtle.py	2008-08-09 01:32:21 UTC (rev 15171)
+++ trunk/subtle/Subtle.py	2008-08-09 01:48:27 UTC (rev 15172)
@@ -1,960 +0,0 @@
-#!/usr/bin/env python
-
-#    This file is part of Subtle
-#
-#    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU General Public License as published by
-#    the Free Software Foundation, either version 3 of the License, or
-#    (at your option) any later version.
-#
-#    This program is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#    GNU General Public License for more details.
-#
-#    You should have received a copy of the GNU General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-
-# Std modules import
-import sys
-import os
-
-try:
-    import pygtk
-    #tell pyGTK, if possible, that we want GTKv2
-    pygtk.require("2.0")
-except ImportError:
-    print "You need to install PyGTK to run Subtle"
-    sys.exit(1)
-    
-try:
-    import gtk
-    import gobject
-    import gtk.glade
-except ImportError:
-    print "You need to install pyGTK or GTKv2"
-    sys.exit(1)
-
-try:
-    import gst
-except ImportError:
-    print "You need GStreamer python bindings to run Subtle"
-    sys.exit(1)
-
-# Subtle imports
-from Subtle.GPlayer import VideoWidget
-from Subtle.GPlayer import GstPlayer
-from Subtle.Subtitles import Subtitles,Discoverer
-from Subtle.MediaInfo import MediaInfo
-from Subtle.SubtleXML import ProjectXML
-
-ONLINE_MODE = 1
-EDITING_MODE = 0
-
-class Subtle:
-    def __init__(self):
-        """
-        In this init we are going to display the main
-        Subtle window
-        """
-        gladefile="Subtle/subtle.glade"
-        windowname="MAIN_WINDOW"
-        
-        self.update_id = -1
-        self.p_position = gst.CLOCK_TIME_NONE
-        self.p_duration = gst.CLOCK_TIME_NONE
-        self.UPDATE_INTERVAL=100
-        
-        self.Subtitle = None
-        self.Subtitles = []
-        # Current subtitle being edited
-        self.cur_edit_sub_iter = None
-        #Current editing mode
-        ## Refer to globals for values
-        self.mode = ONLINE_MODE
-
-        #self.scroll = 0
-        self.videoWidgetGst = None
-        self.player = None
-        self.t_duration = 0
-        self.media = []
-
-        self.wTree=gtk.glade.XML(gladefile,windowname)
-        self.gladefile = gladefile
-        dic = { "gtk_main_quit" : (gtk.main_quit),\
-            "on_main_file_quit_activate": (gtk.main_quit), \
-            "on_main_file_open_activate": self.mainFileOpen, \
-            "on_TOOL_PLAY_clicked": self.playerPlay,\
-            "on_TOOL_STOP_clicked": self.playerStop,\
-            "on_TOOL_SM_clicked": self.playerSlowMotion,\
-            "on_TOOL_FF_clicked":self.playerFastForward,\
-            "on_TOOL_SEEK_FORWARD_clicked": self.playerSeekForward,\
-            "on_TOOL_SEEK_REWIND_clicked": self.playerSeekRewind,\
-            "on_TOOL_HIDE_STREAMS_clicked": self.cb_hideStreamsPane,\
-            "on_TOOL_HIDE_SUBLIST_clicked": self.cb_hideSubPane,\
-            "on_MEDIA_ADJUSTMENT_button_press_event": self.buttonPressAdjustment,\
-            "on_MEDIA_ADJUSTMENT_button_release_event": self.buttonReleaseAdjustment,\
-            "on_MEDIA_ADJUSTMENT_change_value": self.changeValueAdjustment,\
-            "on_VIDEO_OUT_PUT_expose_event": self.exposeEventVideoOut,\
-            "on_main_file_save_activate": self.cb_onSaveMenu,\
-            "on_main_file_save_as_activate": self.cb_onSaveAsMenu,\
-            "on_main_file_new_activate": self.cb_onNewMenu,\
-            "on_MAIN_VIEW_STREAMS_PANE_activate": self.cb_showStreamsPane,\
-            "on_MAIN_VIEW_SUBTITLES_activate": self.cb_showSubtitlePane,\
-            "on_TOOL_DEL_STREAM_clicked": self.cb_delStream,\
-            "on_TOOL_MOD_STREAM_clicked": self.cb_modStream,\
-            "on_TOOL_NEW_STREAM_clicked": self.cb_newStream,\
-            "on_TOOL_ADD_STREAM_clicked": self.cb_addNewStream,\
-            "on_LIST_SUBS_button_release_event": self.cb_onSubsListSelect,\
-            "on_LIST_SUBS_button_press_event": self.cb_onSubsListSelect,\
-            "on_txt_subedit_key_release_event": self.cb_onSubtitleEdit,\
-            "on_tgl_mode_toggled": self.cb_onModeChanged,\
-            "on_TOOL_SAVE_STREAM_clicked": self.cb_saveStream,\
-            "on_TOOL_DEL_SUBS_clicked": self.cb_subDel,\
-            "on_TOOL_OUT_SUB_clicked": self.cb_subOut,\
-            "on_TOOL_IN_SUB_clicked": self.cb_subIn,\
-            "on_TOOL_INS_B4_SUB_clicked": self.cb_onSubInsB4,\
-            "on_TOOL_INS_AFTER_SUB_clicked": self.cb_onSubInsAfter,\
-            "on_TOOL_IN_SUB_clicked": self.cb_subIn}
-        self.wTree.signal_autoconnect (dic)
-        
-        self.windowMainWindow=self.wTree.get_widget("MAIN_WINDOW")
-        self.windowProjectOpen=None
-        self.windowProjectSO=None
-        self.windowNewSubFile=None
-        self.PFileName=None
-        self.windowMediaOpen=None
-        #self.windowStreams=gtk.glade.XML (self.gladefile,"STREAM_WINDOW")
-        #dic = {"on_TOOL_DEL_STREAM_clicked": self.cb_delStream,\
-        #        "on_TOOL_MOD_STREAM_clicked": self.cb_modStream,\
-        #        "on_TOOL_NEW_STREAM_clicked": self.cb_newStream,\
-        #        "on_TOOL_ADD_STREAM_clicked": self.cb_addNewStream,\
-        #        "on_STREAM_WINDOW_delete_event": self.cb_StreamWindowDelete}
-        #self.windowStreams.signal_autoconnect (dic)
-        ### Setup LIST_STREAMS
-        #LIST = self.windowStreams.get_widget("LIST_STREAMS")
-        LIST = self.wTree.get_widget("LIST_STREAMS")
-        if LIST:
-            self.streamsTreeStore = gtk.TreeStore(gobject.TYPE_STRING, gobject.TYPE_UINT)
-            LIST.set_model(self.streamsTreeStore)
-            cell = gtk.CellRendererText()
-            tvcolumn = gtk.TreeViewColumn('Streams', cell, text = 0)
-            LIST.append_column(tvcolumn)
-        
-        #self.windowSubsList=gtk.glade.XML (self.gladefile,"SUBS_LIST")
-        #dic = {"on_LIST_SUBS_cursor_changed": self.cb_onSubsListSelect,\
-        #        "on_TOOL_SAVE_STREAM_clicked": self.cb_saveStream,\
-        #        "on_TOOL_DEL_SUBS_clicked": self.cb_subDel,\
-        #        "on_TOOL_OUT_SUB_clicked": self.cb_subOut,\
-        #        "on_TOOL_IN_SUB_clicked": self.cb_subIn,\
-        #        "on_TOOL_INS_B4_SUB_clicked": self.cb_onSubInsB4,\
-        #        "on_TOOL_INS_AFTER_SUB_clicked": self.cb_onSubInsAfter,\
-        #        "on_TOOL_IN_SUB_clicked": self.cb_subIn,\
-        #        "on_SUBS_LIST_delete_event": self.cb_onSubsWindowDelete}
-        #self.windowSubsList.signal_autoconnect (dic)
-        #SUBLIST = self.windowSubsList.get_widget("LIST_SUBS")
-        SUBLIST = self.wTree.get_widget("LIST_SUBS")
-        SUBLIST.add_events(gtk.gdk._2BUTTON_PRESS)
-        if SUBLIST:
-            self.subsListStore = gtk.ListStore(gobject.TYPE_UINT,
-                                                gobject.TYPE_UINT,
-                                                gobject.TYPE_UINT,
-                                                gobject.TYPE_UINT,
-                                                gobject.TYPE_UINT,
-                                                gobject.TYPE_STRING)
-            SUBLIST.set_model(self.subsListStore)
-            cell = gtk.CellRendererText()
-            tvcolumn = gtk.TreeViewColumn('#', cell, text = 0)
-            SUBLIST.append_column(tvcolumn)
-            cell = gtk.CellRendererText()
-            tvcolumn = gtk.TreeViewColumn('Start Time', cell, text = 1)
-            SUBLIST.append_column(tvcolumn)
-            cell = gtk.CellRendererText()
-            tvcolumn = gtk.TreeViewColumn('End Time', cell, text = 2)
-            SUBLIST.append_column(tvcolumn)
-            cell = gtk.CellRendererText()
-            tvcolumn = gtk.TreeViewColumn('Start Frame', cell, text = 3)
-            SUBLIST.append_column(tvcolumn)
-            cell = gtk.CellRendererText()
-            tvcolumn = gtk.TreeViewColumn('End Frame', cell, text = 4)
-            SUBLIST.append_column(tvcolumn)
-            cell = gtk.CellRendererText()
-            tvcolumn = gtk.TreeViewColumn('Text', cell, text = 5)
-            tvcolumn.set_resizable(True)
-            SUBLIST.append_column(tvcolumn)
-        #WND=self.windowStreams.get_widget("STREAM_WINDOW")
-        #WND.hide()
-        #WND=self.windowSubsList.get_widget("SUBS_LIST")
-        #WND.hide()
-        ### Main window setup
-        self.videoWidget = self.wTree.get_widget("VIDEO_OUT_PUT")
-        self.adjustment = self.wTree.get_widget("MEDIA_ADJUSTMENT")
-        self.labelHour = self.wTree.get_widget("LABEL_HOUR")
-        self.labelMin = self.wTree.get_widget("LABEL_MIN")
-        self.labelSec = self.wTree.get_widget("LABEL_SEC")
-        self.labelMSec = self.wTree.get_widget("LABEL_MSEC")
-        self.playButton = self.wTree.get_widget("TOOL_PLAY")
-        self.lbl_cur_fps = self.wTree.get_widget("lbl_cur_fps")
-        self.streams_pane = self.wTree.get_widget("streams_pane")
-        self.subtitle_pane = self.wTree.get_widget("subtitle_pane")
-        self.txt_subedit = self.wTree.get_widget("txt_subedit")
-        self.tgl_mode = self.wTree.get_widget("tgl_mode")
-        self.spin_seek_value = self.wTree.get_widget("spin_seek_value")
-        self.subList = SUBLIST
-        #self.windowMainWindow.maximize()
-        return
-
-    def cb_onModeChanged(self, widget):
-        """
-            Change from online mode to editing mode
-            and vice versa
-        """
-        # Online mode
-        if self.tgl_mode.get_active():
-            self.mode = ONLINE_MODE
-            self.txt_subedit.set_sensitive(False)
-            return
-        # Editing mode
-        else:
-            self.mode = EDITING_MODE
-            self.txt_subedit.set_sensitive(True)
-            return
-
-
-    def cb_hideSubPane(self, widget):
-        """
-            Hide the subtitles pane
-        """
-        self.subtitle_pane.hide()
-        return
-
-
-    def cb_hideStreamsPane(self, widget):
-        """
-            Hide the streams pane
-        """
-        self.streams_pane.hide()
-        return
-
-
-    def cb_showStreamsPane(self, widget):
-        """
-            Hide the streams pane
-        """
-        self.streams_pane.show()
-        return
-
-
-    def cb_onSubInsB4(self, widget):
-        """
-            Insert new subtitle before current selected
-        """
-        subsList = self.wTree.get_widget("LIST_SUBS")
-        selection = subsList.get_selection()
-        result = selection.get_selected()
-        if result:
-            model, iter = result
-            if self.subsListStore.iter_is_valid(iter):
-                cur, sTime, eTime = self.subsListStore.get(iter, 0, 1, 2)
-                self.Subtitle.subAdd(sTime-1,sTime-2,'',None,1)
-                self.subsListStore.insert_before(iter, (cur, sTime-1, sTime-2,\
-                                                    'New subtitle...'))
-                self.reorder_SubsListStore()
-        return
-
-
-    def cb_onSubInsAfter(self, widget):
-        """
-            Insert new subtitle after current selected
-        """
-        subsList = self.wTree.get_widget("LIST_SUBS")
-        selection = subsList.get_selection()
-        result = selection.get_selected()
-        if result:
-            model, iter = result
-            if self.subsListStore.iter_is_valid(iter):
-                cur, sTime, eTime = self.subsListStore.get(iter, 0, 1, 2)
-                self.Subtitle.subAdd(eTime+1,eTime+2,'',None,1)
-                cur += 1
-                self.subsListStore.insert_after(iter, (cur, eTime+1, eTime+2,\
-                                                        'New subtitle...'))
-                self.reorder_SubsListStore()
-        return
-
-
-    def reorder_SubsListStore(self):
-        """
-            Reorder the subs listStore when added or deleted
-        """
-        iter = self.subsListStore.get_iter_first()
-        cur = 0
-        while iter is not None:
-            if iter is not None:
-                self.subsListStore.set_value(iter, 0, cur)
-                cur += 1
-                iter = self.subsListStore.iter_next(iter)
-
-
-    def cb_subDel(self, widget):
-        """
-            Delete a subtile from the list store and from memory
-        """
-        subsList = self.wTree.get_widget("LIST_SUBS")
-        selection = subsList.get_selection()
-        result = selection.get_selected()
-        if result:
-            model, iter = result
-            subKey = self.subsListStore.get(iter, 1)
-            self.Subtitle.subDel(subKey[0])
-            model.remove(iter)
-            self.reorder_SubsListStore()
-
-
-    def cb_subOut(self, widget):
-        """
-            Set subtitle endtime
-        """
-        if self.player:
-            subsList = self.windowSubsList.get_widget("LIST_SUBS")
-            selection = subsList.get_selection()
-            result = selection.get_selected()
-            if result:
-                model, iter = result
-                subKey, end_time = self.subsListStore.get(iter, 1, 2)
-                try:
-                    self.Subtitle.getSub(subKey).end_time = self.p_position/1000000
-                    self.Subtitle.subUpdate(subKey)
-                except:
-                    print "Error while setting subtitle timecode"
-                    return
-                self.subsListStore.set(iter,2,self.p_position/1000000)
-        return True
-
-
-    def cb_subIn(self, widget):
-        """
-            Set subtitle start time
-        """
-        if self.player:
-            subsList = self.windowSubsList.get_widget("LIST_SUBS")
-            selection = subsList.get_selection()
-            result = selection.get_selected()
-            if result:
-                model, iter = result
-                subKey = self.subsListStore.get(iter, 1)
-                try:
-                    self.Subtitle.getSub(subKey[0]).start_time = self.p_position/1000000
-                    self.Subtitle.subUpdate(subKey[0])
-                except:
-                    print "Error while setting subtitle timecode"
-                    return
-                self.subsListStore.set(iter,1,self.p_position/1000000)
-        return True
-
-
-    def cb_onSubsWindowDelete(self, widget, event):
-        widget.hide()
-        return True
-
-
-    def cb_StreamWindowDelete(self, widget, event):
-        widget.hide()
-        return True
-
-
-    def cb_onSubtitleWindow(self, menu):
-        if self.windowSubsList:
-            WND=self.windowSubsList.get_widget("SUBS_LIST")
-            WND.show()
-
-
-    def cb_showSubtitlePane(self, menu):
-        """
-           Show subtitle pane
-        """
-        self.subtitle_pane.show()
-
-    def getSubtitle(self, source):
-        for i in self.Subtitles:
-            if i.subSource==source:
-                return i
-        return None
-
-
-    def cb_saveStream(self, widget):
-        """
-            Save a stream. This will be renamed to cb_saveSub
-            since we don't offer video editting (yet)
-        """
-        #TODO: This is broken. How about implementing it correctly?
-        TView = self.windowStreams.get_widget("LIST_STREAMS")
-        TSelec = TView.get_selection()
-        TModel, TIter = TSelec.get_selected()
-        if not TIter:
-            return
-        N=TModel.get_value(TIter, 1)
-        mInfo = self.media[N]
-        if "subtitle" in mInfo.MIME:
-            tSubtitle = self.getSubtitle(mInfo.Streams[0].ID)
-            tSubtitle.subSave(mInfo.source, 1)
-
-
-    def cb_modStream(self, widget):
-        # We have removed the window
-        #if not self.windowStreams:
-        #    return
-        if not self.streamsTreeStore:
-            return
-        #TView = self.windowStreams.get_widget("LIST_STREAMS")
-        TView = self.wTree.get_widget("LIST_STREAMS")
-        TSelec = TView.get_selection()
-        TModel, TIter = TSelec.get_selected()
-        if not TIter:
-            return
-        N=TModel.get_value(TIter, 0)
-        # FIXME: We should actually get the selected subtitle
-        if "Subtitle" in N:
-            self.setSubtitle()
-
-
-    def cb_newStream(self, widget):
-        """
-           Create a new subtitle
-        """
-        #TODO: Lets popup something that will let us choose sub type
-        if(self.windowNewSubFile==None):
-            self.windowNewSubFile=gtk.glade.XML (self.gladefile,"NEW_SUBTITLE")
-            #dic={"on_OPEN_BUTTON_CANCEL_clicked": self.cb_openMediaCancel,\
-            #    "on_OPEN_BUTTON_OPEN_clicked": self.cb_openMediaOpen }
-            #self.windowMediaOpen.signal_autoconnect(dic)
-            WND=self.windowNewSubFile.get_widget("NEW_SUBTITLE")
-            WND.show()
-        else:
-            WND=self.windowNewSubFile.get_widget("NEW_SUBTITLE")
-            if not WND:
-                self.windowNewSubFile=None
-            else:
-                WND.show()
-        return
-
-
-    def setSubtitle(self):
-        if self.Subtitle:
-            # We have removed the window for now
-            #if (self.windowStreams):
-            #    WND=self.windowSubsList.get_widget("SUBS_LIST")
-            #    WND.show()
-            self.subsWindowUpdate()
-
-
-    def updateStreamWindow(self):
-        #FIXME: This should be more complete and better handled
-        # Maybe all streams must be on the same list/dict
-        if not self.streamsTreeStore:
-            return
-        self.streamsTreeStore.clear()
-        for sub in self.Subtitles:
-            iter = self.streamsTreeStore.append(None)
-            self.streamsTreeStore.set(iter, 0, "Subtitle: "+ sub.filename, 1, self.Subtitles.index(sub))
-            child = self.streamsTreeStore.append(iter)
-            self.streamsTreeStore.set(child, 0, "Type: " + sub.subType, \
-                    1, self.Subtitles.index(sub))
-            child = self.streamsTreeStore.append(iter)
-            self.streamsTreeStore.set(child, 0, "Encoding: " + sub.encoding, \
-                    1, self.Subtitles.index(sub))
-        for mInfo in self.media:
-            iter = self.streamsTreeStore.append(None)
-            self.streamsTreeStore.set(iter, 0, mInfo.source, 1, self.media.index(mInfo))
-            if mInfo.has_video:
-                child = self.streamsTreeStore.append(iter)
-                self.streamsTreeStore.set(child, 0, "Mimetype: " + mInfo.MIME.split("/")[1], \
-                        1, self.media.index(mInfo))
-                child = self.streamsTreeStore.append(iter)
-                self.streamsTreeStore.set(child, 0, "Resolution: %dx%d "% (mInfo.videoWidth, mInfo.videoHeight), \
-                        1, self.media.index(mInfo))
-                child = self.streamsTreeStore.append(iter)
-                self.streamsTreeStore.set(child, 0, ("Framerate: %.2f" % mInfo.framerate), \
-                        1, self.media.index(mInfo))
-                child = self.streamsTreeStore.append(iter)
-                self.streamsTreeStore.set(child, 0, ("Length: %s s" % mInfo.videoLengthS), \
-                        1, self.media.index(mInfo))
-                child = self.streamsTreeStore.append(iter)
-                self.streamsTreeStore.set(child, 0, ("Frames: %d" % (mInfo.videoLengthS/(1/mInfo.framerate))), \
-                        1, self.media.index(mInfo))
-                child = self.streamsTreeStore.append(iter)
-
-
-    def cb_delStream(self, widget):
-        """
-            Remove a stream from the current project
-        """
-        #FIXME: We broke this ...
-        if not self.windowStreams:
-            return
-        if not self.streamsTreeStore:
-            return
-        TView = self.windowStreams.get_widget("LIST_STREAMS")
-        TSelec = TView.get_selection()
-        TModel, TIter = TSelec.get_selected()
-        if not TIter:
-            return
-        N=TModel.get_value(TIter, 1)
-        self.updateStreamWindow()
-
-
-    def cb_openMediaCancel(self, widget):
-        if self.windowMediaOpen:
-            WND=self.windowMediaOpen.get_widget("OPEN_MEDIA")
-            WND.hide()
-
-
-    def cb_openMediaOpen(self, widget):
-        """
-            Callback to open a file
-            We do not add filters here because we
-            want to make subtle as dynamic as possible
-            and the number of supported files is too big and
-            sometimes not extensions based
-        """
-        WND=self.windowMediaOpen.get_widget("OPEN_MEDIA")
-        FN=WND.get_filename()
-        URI=WND.get_uri()
-        self.TEST_SUB_URI = URI
-        WND.hide()
-
-        tmpSub = Discoverer.discoverer(FN)
-        if tmpSub:
-            self.Subtitle = tmpSub
-            self.Subtitles.append(tmpSub)
-            self.updateStreamWindow()
-        else:
-            MI = MediaInfo(FN, URI)
-            # Lets poll for information
-            gobject.timeout_add(30, self.addMedia, MI)
-    
-    def addMedia(self, mInfo):
-        """
-            This is polled untill a media file discover process
-            has ended. When it has, throw error to the user if not
-            supported.
-        """
-        if not mInfo:
-            return
-        # First, wait for media discovery 
-        if mInfo.poll():
-            return True 
-        mInfo = mInfo.getMedia()
-        if mInfo.MIME:
-            # Set the subtitle framerate
-            if self.Subtitle:
-                self.Subtitle.framerate = mInfo.framerate
-            self.media.append(mInfo)
-            self.updateStreamWindow()
-            #Set videoWidget sizes according to media standards
-            self.videoWidget.set_size_request(mInfo.videoWidth, \
-                                                mInfo.videoHeight)
-            self.videoWidgetGst=VideoWidget(self.videoWidget)
-            self.player=GstPlayer(self.videoWidgetGst)
-            self.player.set_location("file://"+mInfo.source)
-            if self.videoWidget.flags() & gtk.REALIZED:
-                self.play_toggled()
-            else:
-                self.videoWidget.connect_after('realize',
-                                           lambda *x: self.play_toggled())
-        else:
-            errorDialog = gtk.MessageDialog(self.windowMainWindow, \
-                                            gtk.DIALOG_MODAL, \
-                                            gtk.MESSAGE_ERROR, \
-                                            gtk.BUTTONS_CLOSE, \
-                                            "This file format is not supported \
-                                            or not detected.")
-            result = errorDialog.run()
-            if (result == gtk.RESPONSE_CLOSE):
-                errorDialog.destroy()
-        return
-
-
-    def cb_addNewStream(self, widget):
-        if(self.windowMediaOpen==None):
-            self.windowMediaOpen=gtk.glade.XML (self.gladefile,"OPEN_MEDIA")
-            dic={"on_OPEN_BUTTON_CANCEL_clicked": self.cb_openMediaCancel,\
-                "on_OPEN_BUTTON_OPEN_clicked": self.cb_openMediaOpen }
-            self.windowMediaOpen.signal_autoconnect(dic)
-        else:
-            WND=self.windowMediaOpen.get_widget("OPEN_MEDIA")
-            if not WND:
-                self.windowMediaOpen=None
-            else:
-                WND.show()
-        return
-
-
-    def cb_onNewMenu(self, menu):
-        if self.windowStreams:
-            WND=self.windowStreams.get_widget("STREAM_WINDOW")
-            WND.show()
-
-
-    def cb_onSubsListSelect(self, widget, event):
-        """
-            Do the proper thing when subtitle is selected
-            2 clicks seeks de video to its timecode
-            1 click edits on the TextView
-        """
-        #FIXME: Something nasty happens on the selection of the subtitle
-        # Only happens the first time and throws an exception
-        Row=None
-        Selection = widget.get_selection()
-        if Selection==None:
-            return
-        Model, Rows = Selection.get_selected_rows()
-        if Rows != None:
-            #FIXME: Buggy solution!! Has something to do with
-            # button press release event generated...
-            Row = Model[Rows[0][0]]
-            if self.Subtitle:
-                Sub = self.Subtitle.subs[Row[1]]
-        if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
-            if self.player:
-                B=0;
-                self.player.set_subtitle_text(Sub.getSubText())
-                if self.player.is_playing():
-                    B=1
-                    self.play_toggled()
-                real = long(Row[1]) # in ns
-                self.player.seek(real*1000000)
-                # allow for a preroll
-                self.player.get_state(timeout=50*gst.MSECOND) # 50 ms
-                if B==1:
-                    self.play_toggled()
-        if event.type == gtk.gdk.BUTTON_RELEASE:
-            model, self.cur_edit_sub_iter =  Selection.get_selected() 
-            self.setSubtitleEdit( Sub.getSubText() )
-
-
-    def cb_onSubTextEdited(self, cell, path, new_text):
-        """
-            Callback to change subtitle when subtitle text was changed
-        """
-        iter = self.subsListStore.get_iter(path)
-        subKey, ETime, Text = self.subsListStore.get(iter, 1, 2, 3)
-        subtitle = self.Subtitle.getSub(subKey)
-        if subtitle.text != new_text:
-            subAttr = subtitle.Attributes
-            self.Subtitle.subDel(subKey)
-            self.Subtitle.subAdd(subKey,ETime,new_text,subAttr,1)
-            self.subsListStore.set(iter,3,new_text)
-
-        return True
-
-
-    def cb_onSubtitleEdit(self, widget, event):
-        """
-            Updates the subtile list in realtime
-        """
-        id, subKey, ETime = self.subsListStore.get(self.cur_edit_sub_iter, 0, 1, 2)
-        #self.Subtitle.subDel(subKey)
-        text = self.txt_subedit.get_buffer().get_property('text')
-        self.Subtitle.updateText(subKey,text)
-        #self.Subtitle.subAdd(subKey,ETime,text,None,0)
-        self.subsListStore.set(self.cur_edit_sub_iter, 3, text) 
-        return
-
-
-    def setSubtitleEdit(self,sub):
-        """
-            Set the subtitle to be edited
-        """
-        buf = self.txt_subedit.get_buffer()
-        buf.set_text(sub)
-
-
-    def subsWindowUpdate(self):
-        if not self.Subtitle:
-            return
-        # We have removed the window for now
-        #if self.windowSubsList:
-        self.subsListStore.clear()
-        j=0
-        for i in self.Subtitle.subKeys:
-            S=self.Subtitle.subs[i]
-            iter = self.subsListStore.append(None)
-            self.subsListStore.set(iter,0, j, 
-                                        1, int(S.start_time),
-                                        2, int(S.end_time),
-                                        3, int(S.start_frame),
-                                        4, int(S.end_frame),
-                                        5, str(S.getSubText()))
-            j +=1
-
-
-    def saveProject(self):
-        if not self.PFileName:
-            return
-        if self.PFileName[-4:]!=".spf":
-            self.PFileName=self.PFileName+".spf"
-        PXML=ProjectXML()
-        PXML.addHeadInfo("title", "Subtle development version")
-        PXML.addHeadInfo("desc", "This is version current at development stage.")
-        PXML.addHeadInfo("author", "Joao Mesquita")
-        PXML.addHeadInfo("email", "jmesquita at gmail.com")
-        PXML.addHeadInfo("info", "Sample of save function")
-        for i in self.media:
-            PXML.addMedia(i)
-        for i in self.Subtitles:
-            PXML.addSubtitle(i)
-        PXML.write(self.PFileName)
-
-
-    def cb_projectSaveOpen(self, widget):
-        WND=self.windowProjectSO.get_widget("SAVE_OPEN_PFILE")
-        self.PFileName=WND.get_filename()
-        self.saveProject()
-        WND.hide()
-
-
-    def cb_projectSaveCancel(self, widget):
-        if(self.windowProjectSO==None): return
-        WND=self.windowProjectSO.get_widget("SAVE_OPEN_PFILE")
-        WND.hide()
-
-
-    def cb_onSaveAsMenu(self, widget):
-        self.PFileName=None
-        self.cb_onSaveMenu(widget)
-
-
-    def cb_onSaveMenu(self, widget):
-        if self.PFileName:
-            self.saveProject()
-            return
-        if(self.windowProjectSO==None):
-            self.windowProjectSO=gtk.glade.XML (self.gladefile,"SAVE_OPEN_PFILE")
-            dic={"on_PROJECT_BUTTON_CANCEL_clicked": self.cb_projectSaveCancel,\
-                "on_PROJECT_BUTTON_OK_clicked": self.cb_projectSaveOpen }
-            self.windowProjectSO.signal_autoconnect(dic)
-            WND=self.windowProjectSO.get_widget("SAVE_OPEN_PFILE")
-            WND.set_action(gtk.FILE_CHOOSER_ACTION_SAVE)
-            OKB = self.windowProjectSO.get_widget("PROJECT_BUTTON_OK")
-            OKB.set_label("gtk-save")
-            OKB.set_use_stock(True)
-            Filter=gtk.FileFilter()
-            Filter.set_name("Subtle project file")
-            Filter.add_pattern("*.spf")
-            WND.add_filter(Filter)
-        else:
-            WND=self.windowProjectSO.get_widget("SAVE_OPEN_PFILE")
-            if(WND==None):
-                self.windowProjectSO=None
-                self.cb_onSaveMenu(widget)
-            else:
-                WND.show()
-
-
-    def cb_setSubStartTime(self, widget):
-        self.subStartTime.set_value(self.p_position/1000000)
-
-
-    def cb_setSubEndTime(self, widget):
-        self.subEndTime.set_value(self.p_position/1000000)
-
-
-    def setSubStartTime(self, time):
-        self.subStartTime.set_value(time)
-
-
-    def setSubEndTime(self, time):
-        self.subEndTime.set_value(time)
-
-
-    def exposeEventVideoOut(self, widget, event):
-        if self.videoWidgetGst:
-            self.videoWidgetGst.do_expose_event(event)
-
-
-    def changeValueAdjustment(self, widget, t1, t2):
-        #if (not self.scroll):
-            real = long(self.adjustment.get_value()) # in ns
-            self.player.seek(real)
-            # allow for a preroll
-            self.player.get_state(timeout=50*gst.MSECOND) # 50 ms
-
-
-    def buttonReleaseAdjustment(self, widget, event):
-        self.scroll=0
-
-
-    def buttonPressAdjustment(self, widget, event):
-        self.scroll=1
-
-
-    def playerStop(self, widget):
-        if self.player:
-            if self.player.is_playing():
-                self.play_toggled()
-            self.player.stop()
-
-
-    def playerPlay(self, widget):
-        if self.player:
-            self.play_toggled()
-
-
-    def playerSlowMotion(self, widget):
-        """
-            Put the current playing video in slow motion
-        """
-        self.player.slow_motion()
-        self.playButton.set_stock_id(gtk.STOCK_MEDIA_PLAY)
-        pass
-
-
-    def playerFastForward(self, widget):
-        """
-            Put the current playing video in FastForward 
-        """
-        self.player.fast_forward()
-        self.playButton.set_stock_id(gtk.STOCK_MEDIA_PLAY)
-        pass
-
-
-    def playerSeekForward(self, widget):
-        """
-            Jump some time or frames (depends on the subtitle format 
-            we are using) beyond current position
-        """
-        # TODO: Here we have to add support for more subtitle formats
-        cur_position = self.player.query_position()[0]
-        next_position = cur_position + ( self.spin_seek_value.get_value_as_int()*1000000000 )
-        self.player.seek(next_position)
-        self.update_scale_cb()
-        return
-
-
-    def playerSeekRewind(self, widget):
-        """
-            Jump back some time or frames (depends on the subtitle format
-            we are using)
-        """
-        # TODO: Here we have to add support for more subtitle formats
-        cur_position = self.player.query_position()[0]
-        next_position = cur_position - ( self.spin_seek_value.get_value_as_int()*1000000000 )
-        self.player.seek(next_position)
-        self.update_scale_cb()
-        return
-
-
-    def mainFileOpen(self, widget):
-        if(self.windowProjectOpen==None):
-            self.windowProjectOpen=gtk.glade.XML (self.gladefile,"SAVE_OPEN_PFILE")
-            dic={"on_PROJECT_BUTTON_CANCEL_clicked": self.openFileCancel,\
-                "on_PROJECT_BUTTON_OK_clicked": self.openFileOpen }
-            self.windowProjectOpen.signal_autoconnect(dic)
-            WND=self.windowProjectOpen.get_widget("SAVE_OPEN_PFILE")
-            WND.set_action(gtk.FILE_CHOOSER_ACTION_OPEN)
-            OKB = self.windowProjectOpen.get_widget("PROJECT_BUTTON_OK")
-            OKB.set_label("gtk-open")
-            OKB.set_use_stock(True)
-            Filter=gtk.FileFilter()
-            Filter.set_name("Subtle project file")
-            Filter.add_pattern("*.spf")
-            WND.add_filter(Filter)
-        else:
-            WND=self.windowProjectOpen.get_widget("SAVE_OPEN_PFILE")
-            if(WND==None):
-                self.windowProjectOpen=None
-                self.mainFileOpen(widget)
-            else:
-                WND.show()
-        return
-
-
-    def openFileCancel(self, widget):
-        if(self.windowProjectOpen==None): return
-        WND=self.windowProjectOpen.get_widget("SAVE_OPEN_PFILE")
-        WND.hide()
-        return
-
-
-    def openFileOpen(self, widget):
-        WND=self.windowProjectOpen.get_widget("SAVE_OPEN_PFILE")
-        self.PFileName=WND.get_filename()
-        WND.hide()
-        PXML=ProjectXML()
-        PXML.load(self.PFileName)
-        for i in PXML.getMedia():
-            self.addMedia(i)
-        self.Subtitles=[]
-        for i in PXML.getSubtitle():
-            self.Subtitles.append(i)
-        if len(self.media)>0:
-            WND=self.windowStreams.get_widget("STREAM_WINDOW")
-            WND.show()
-        return
-
-    def play_toggled(self):
-        if self.player.is_playing():
-            if self.player.get_rate() != 1.0:
-                self.player.play()
-                self.playButton.set_stock_id(gtk.STOCK_MEDIA_PAUSE)
-            else:
-                self.player.pause()
-                self.playButton.set_stock_id(gtk.STOCK_MEDIA_PLAY)
-                if gobject.source_remove(self.update_id):
-                        self.update_id = -1
-        else:
-            self.player.play()
-            if self.update_id == -1:
-                self.update_id = gobject.timeout_add(self.UPDATE_INTERVAL,
-                                                     self.update_scale_cb)
-            self.playButton.set_stock_id(gtk.STOCK_MEDIA_PAUSE)
-
-
-    def update_scale_cb(self):
-        self.p_position, self.p_duration = self.player.query_position()
-        if self.p_duration != self.t_duration:
-            self.t_duration = self.p_duration
-            self.adjustment.set_range(0, self.t_duration)
-        tmSec= self.p_position/1000000
-        MSec = tmSec
-        tmSec = tmSec/1000
-        Sec = tmSec%60
-        tmSec = tmSec/60
-        Min = tmSec%60
-        Hour = tmSec/60
-        if self.Subtitle:
-            TText = self.Subtitle.getSub(MSec)
-            if self.player.is_playing():
-                if TText:
-                    self.player.set_subtitle_text( TText.getSubText() )
-                    # Select current playing subtitle
-                    if self.mode == ONLINE_MODE:
-                        Selection = self.subList.get_selection() 
-                        #FIXME: This sometimes bugs ... Why??
-                        Selection.select_path(TText.number-1)
-                        self.setSubtitleEdit( TText.getSubText() )
-                else:
-                    self.player.set_subtitle_text('')
-                    if self.mode == ONLINE_MODE:
-                        self.setSubtitleEdit('')
-                        # Unselect what is not being played
-                        Selection = self.subList.get_selection()
-                        if Selection:
-                            Selection.unselect_all()
-        if (self.p_position != gst.CLOCK_TIME_NONE):# and (not self.scroll):
-            value = self.p_position
-            self.adjustment.set_value(value)
-        self.labelHour.set_text("%02d"%Hour)
-        self.labelMin.set_text("%02d"%Min)
-        self.labelSec.set_text("%02d"%Sec)
-        #FIXME: We are not displaying this correctly
-        self.labelMSec.set_text("%09d"%MSec)
-        self.lbl_cur_fps.set_text("%04d"%(self.player.query_frame(self.p_position)))
-        return True
-
-#==============================================================================
-#        MAIN:
-#==============================================================================
-subtle=Subtle()
-gtk.main()

Modified: trunk/subtle/docs/html/Subtle-module.html
===================================================================
--- trunk/subtle/docs/html/Subtle-module.html	2008-08-09 01:32:21 UTC (rev 15171)
+++ trunk/subtle/docs/html/Subtle-module.html	2008-08-09 01:48:27 UTC (rev 15172)
@@ -95,6 +95,7 @@
     <li> <strong class="uidlink"><a href="Subtle.Subtitles.Subtitles-module.html">Subtle.Subtitles.Subtitles</a></strong>    </li>
     </ul>
     </li>
+    <li> <strong class="uidlink"><a href="Subtle.Subtle-module.html">Subtle.Subtle</a></strong>    </li>
     <li> <strong class="uidlink"><a href="Subtle.SubtleXML-module.html">Subtle.SubtleXML</a></strong>    </li>
   </ul></td></tr>
 </table>
@@ -131,7 +132,7 @@
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Fri Aug  8 22:14:07 2008
+    Generated by Epydoc 3.0.1 on Fri Aug  8 22:42:29 2008
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"

Modified: trunk/subtle/docs/html/Subtle-pysrc.html
===================================================================
--- trunk/subtle/docs/html/Subtle-pysrc.html	2008-08-09 01:32:21 UTC (rev 15171)
+++ trunk/subtle/docs/html/Subtle-pysrc.html	2008-08-09 01:48:27 UTC (rev 15172)
@@ -99,7 +99,7 @@
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Fri Aug  8 22:14:08 2008
+    Generated by Epydoc 3.0.1 on Fri Aug  8 22:42:29 2008
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"

Modified: trunk/subtle/docs/html/api-objects.txt
===================================================================
--- trunk/subtle/docs/html/api-objects.txt	2008-08-09 01:32:21 UTC (rev 15171)
+++ trunk/subtle/docs/html/api-objects.txt	2008-08-09 01:48:27 UTC (rev 15172)
@@ -17,6 +17,9 @@
 Subtle.Subtitles.Line	Subtle.Subtitles.Line-module.html
 Subtle.Subtitles.Sub	Subtle.Subtitles.Sub-module.html
 Subtle.Subtitles.Subtitles	Subtle.Subtitles.Subtitles-module.html
+Subtle.Subtle	Subtle.Subtle-module.html
+Subtle.Subtle.EDITING_MODE	Subtle.Subtle-module.html#EDITING_MODE
+Subtle.Subtle.ONLINE_MODE	Subtle.Subtle-module.html#ONLINE_MODE
 Subtle.SubtleXML	Subtle.SubtleXML-module.html
 Subtle.GPlayer.GstPlayer	Subtle.GPlayer.GstPlayer-class.html
 Subtle.GPlayer.GstPlayer.play	Subtle.GPlayer.GstPlayer-class.html#play
@@ -99,6 +102,63 @@
 Subtle.Subtitles.Subtitles.Subtitles.updateText	Subtle.Subtitles.Subtitles.Subtitles-class.html#updateText
 Subtle.Subtitles.Subtitles.Subtitles.__init__	Subtle.Subtitles.Subtitles.Subtitles-class.html#__init__
 Subtle.Subtitles.Subtitles.Subtitles.subDel	Subtle.Subtitles.Subtitles.Subtitles-class.html#subDel
+Subtle.Subtle.Subtle	Subtle.Subtle.Subtle-class.html
+Subtle.Subtle.Subtle.cb_hideStreamsPane	Subtle.Subtle.Subtle-class.html#cb_hideStreamsPane
+Subtle.Subtle.Subtle.setSubEndTime	Subtle.Subtle.Subtle-class.html#setSubEndTime
+Subtle.Subtle.Subtle.cb_openMediaOpen	Subtle.Subtle.Subtle-class.html#cb_openMediaOpen
+Subtle.Subtle.Subtle.cb_projectSaveOpen	Subtle.Subtle.Subtle-class.html#cb_projectSaveOpen
+Subtle.Subtle.Subtle.getSubtitle	Subtle.Subtle.Subtle-class.html#getSubtitle
+Subtle.Subtle.Subtle.cb_onSubInsB4	Subtle.Subtle.Subtle-class.html#cb_onSubInsB4
+Subtle.Subtle.Subtle.playerFastForward	Subtle.Subtle.Subtle-class.html#playerFastForward
+Subtle.Subtle.Subtle.cb_modStream	Subtle.Subtle.Subtle-class.html#cb_modStream
+Subtle.Subtle.Subtle.update_scale_cb	Subtle.Subtle.Subtle-class.html#update_scale_cb
+Subtle.Subtle.Subtle.cb_showSubtitlePane	Subtle.Subtle.Subtle-class.html#cb_showSubtitlePane
+Subtle.Subtle.Subtle.changeValueAdjustment	Subtle.Subtle.Subtle-class.html#changeValueAdjustment
+Subtle.Subtle.Subtle.playerStop	Subtle.Subtle.Subtle-class.html#playerStop
+Subtle.Subtle.Subtle.__init__	Subtle.Subtle.Subtle-class.html#__init__
+Subtle.Subtle.Subtle.cb_delStream	Subtle.Subtle.Subtle-class.html#cb_delStream
+Subtle.Subtle.Subtle.cb_projectSaveCancel	Subtle.Subtle.Subtle-class.html#cb_projectSaveCancel
+Subtle.Subtle.Subtle.cb_onSaveAsMenu	Subtle.Subtle.Subtle-class.html#cb_onSaveAsMenu
+Subtle.Subtle.Subtle.openFileOpen	Subtle.Subtle.Subtle-class.html#openFileOpen
+Subtle.Subtle.Subtle.cb_newStream	Subtle.Subtle.Subtle-class.html#cb_newStream
+Subtle.Subtle.Subtle.cb_saveStream	Subtle.Subtle.Subtle-class.html#cb_saveStream
+Subtle.Subtle.Subtle.cb_hideSubPane	Subtle.Subtle.Subtle-class.html#cb_hideSubPane
+Subtle.Subtle.Subtle.cb_setSubStartTime	Subtle.Subtle.Subtle-class.html#cb_setSubStartTime
+Subtle.Subtle.Subtle.cb_StreamWindowDelete	Subtle.Subtle.Subtle-class.html#cb_StreamWindowDelete
+Subtle.Subtle.Subtle.buttonPressAdjustment	Subtle.Subtle.Subtle-class.html#buttonPressAdjustment
+Subtle.Subtle.Subtle.cb_onSubInsAfter	Subtle.Subtle.Subtle-class.html#cb_onSubInsAfter
+Subtle.Subtle.Subtle.cb_onSubsWindowDelete	Subtle.Subtle.Subtle-class.html#cb_onSubsWindowDelete
+Subtle.Subtle.Subtle.cb_subIn	Subtle.Subtle.Subtle-class.html#cb_subIn
+Subtle.Subtle.Subtle.cb_addNewStream	Subtle.Subtle.Subtle-class.html#cb_addNewStream
+Subtle.Subtle.Subtle.cb_openMediaCancel	Subtle.Subtle.Subtle-class.html#cb_openMediaCancel
+Subtle.Subtle.Subtle.play_toggled	Subtle.Subtle.Subtle-class.html#play_toggled
+Subtle.Subtle.Subtle.cb_setSubEndTime	Subtle.Subtle.Subtle-class.html#cb_setSubEndTime
+Subtle.Subtle.Subtle.cb_onSubtitleWindow	Subtle.Subtle.Subtle-class.html#cb_onSubtitleWindow
+Subtle.Subtle.Subtle.mainFileOpen	Subtle.Subtle.Subtle-class.html#mainFileOpen
+Subtle.Subtle.Subtle.playerSlowMotion	Subtle.Subtle.Subtle-class.html#playerSlowMotion
+Subtle.Subtle.Subtle.cb_subOut	Subtle.Subtle.Subtle-class.html#cb_subOut
+Subtle.Subtle.Subtle.setSubStartTime	Subtle.Subtle.Subtle-class.html#setSubStartTime
+Subtle.Subtle.Subtle.addMedia	Subtle.Subtle.Subtle-class.html#addMedia
+Subtle.Subtle.Subtle.updateStreamWindow	Subtle.Subtle.Subtle-class.html#updateStreamWindow
+Subtle.Subtle.Subtle.subsWindowUpdate	Subtle.Subtle.Subtle-class.html#subsWindowUpdate
+Subtle.Subtle.Subtle.cb_subDel	Subtle.Subtle.Subtle-class.html#cb_subDel
+Subtle.Subtle.Subtle.playerSeekForward	Subtle.Subtle.Subtle-class.html#playerSeekForward
+Subtle.Subtle.Subtle.playerSeekRewind	Subtle.Subtle.Subtle-class.html#playerSeekRewind
+Subtle.Subtle.Subtle.reorder_SubsListStore	Subtle.Subtle.Subtle-class.html#reorder_SubsListStore
+Subtle.Subtle.Subtle.cb_onSubtitleEdit	Subtle.Subtle.Subtle-class.html#cb_onSubtitleEdit
+Subtle.Subtle.Subtle.cb_onSubTextEdited	Subtle.Subtle.Subtle-class.html#cb_onSubTextEdited
+Subtle.Subtle.Subtle.cb_onSaveMenu	Subtle.Subtle.Subtle-class.html#cb_onSaveMenu
+Subtle.Subtle.Subtle.setSubtitle	Subtle.Subtle.Subtle-class.html#setSubtitle
+Subtle.Subtle.Subtle.cb_onModeChanged	Subtle.Subtle.Subtle-class.html#cb_onModeChanged
+Subtle.Subtle.Subtle.buttonReleaseAdjustment	Subtle.Subtle.Subtle-class.html#buttonReleaseAdjustment
+Subtle.Subtle.Subtle.cb_onSubsListSelect	Subtle.Subtle.Subtle-class.html#cb_onSubsListSelect
+Subtle.Subtle.Subtle.setSubtitleEdit	Subtle.Subtle.Subtle-class.html#setSubtitleEdit
+Subtle.Subtle.Subtle.exposeEventVideoOut	Subtle.Subtle.Subtle-class.html#exposeEventVideoOut
+Subtle.Subtle.Subtle.openFileCancel	Subtle.Subtle.Subtle-class.html#openFileCancel
+Subtle.Subtle.Subtle.saveProject	Subtle.Subtle.Subtle-class.html#saveProject
+Subtle.Subtle.Subtle.playerPlay	Subtle.Subtle.Subtle-class.html#playerPlay
+Subtle.Subtle.Subtle.cb_showStreamsPane	Subtle.Subtle.Subtle-class.html#cb_showStreamsPane
+Subtle.Subtle.Subtle.cb_onNewMenu	Subtle.Subtle.Subtle-class.html#cb_onNewMenu
 Subtle.SubtleXML.ProjectXML	Subtle.SubtleXML.ProjectXML-class.html
 Subtle.SubtleXML.ProjectXML.load	Subtle.SubtleXML.ProjectXML-class.html#load
 Subtle.SubtleXML.ProjectXML.write	Subtle.SubtleXML.ProjectXML-class.html#write

Modified: trunk/subtle/docs/html/class-tree.html
===================================================================
--- trunk/subtle/docs/html/class-tree.html	2008-08-09 01:32:21 UTC (rev 15171)
+++ trunk/subtle/docs/html/class-tree.html	2008-08-09 01:48:27 UTC (rev 15172)
@@ -87,6 +87,8 @@
     </li>
     </ul>
     </li>
+    <li> <strong class="uidlink"><a href="Subtle.Subtle.Subtle-class.html">Subtle.Subtle.Subtle</a></strong>
+    </li>
     <li> <strong class="uidlink"><a href="Subtle.GPlayer.VideoWidget-class.html">Subtle.GPlayer.VideoWidget</a></strong>
     </li>
 </ul>
@@ -121,7 +123,7 @@
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Fri Aug  8 22:14:07 2008
+    Generated by Epydoc 3.0.1 on Fri Aug  8 22:42:29 2008
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"

Modified: trunk/subtle/docs/html/help.html
===================================================================
--- trunk/subtle/docs/html/help.html	2008-08-09 01:32:21 UTC (rev 15171)
+++ trunk/subtle/docs/html/help.html	2008-08-09 01:48:27 UTC (rev 15172)
@@ -256,7 +256,7 @@
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Fri Aug  8 22:14:07 2008
+    Generated by Epydoc 3.0.1 on Fri Aug  8 22:42:29 2008
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"

Modified: trunk/subtle/docs/html/identifier-index.html
===================================================================
--- trunk/subtle/docs/html/identifier-index.html	2008-08-09 01:32:21 UTC (rev 15171)
+++ trunk/subtle/docs/html/identifier-index.html	2008-08-09 01:48:27 UTC (rev 15172)
@@ -60,10 +60,10 @@
 </td><td>
 [
  <a href="#A">A</a>
-  B
+ <a href="#B">B</a>
  <a href="#C">C</a>
  <a href="#D">D</a>
-  E
+ <a href="#E">E</a>
  <a href="#F">F</a>
  <a href="#G">G</a>
  <a href="#H">H</a>
@@ -76,7 +76,7 @@
  <a href="#O">O</a>
  <a href="#P">P</a>
  <a href="#Q">Q</a>
-  R
+ <a href="#R">R</a>
  <a href="#S">S</a>
   T
  <a href="#U">U</a>
@@ -97,9 +97,27 @@
 <span class="index-where">(in&nbsp;<a href="Subtle.SubtleXML.ProjectXML-class.html">ProjectXML</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.SubtleXML.ProjectXML-class.html#addMedia">addMedia()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.SubtleXML.ProjectXML-class.html">ProjectXML</a>)</span></td>
+<td width="33%" class="link-index">&nbsp;</td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#addMedia">addMedia()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.SubtleXML.ProjectXML-class.html#addSubtitle">addSubtitle()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.SubtleXML.ProjectXML-class.html">ProjectXML</a>)</span></td>
+<td width="33%" class="link-index">&nbsp;</td>
 </tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="B">B</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#buttonPressAdjustment">buttonPressAdjustment()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#buttonReleaseAdjustment">buttonReleaseAdjustment()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index">&nbsp;</td>
+</tr>
 <tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
 </table>
 </td></tr>
@@ -107,12 +125,92 @@
 <td valign="top">
 <table class="link-index" width="100%" border="1">
 <tr>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_addNewStream">cb_addNewStream()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_onSubInsAfter">cb_onSubInsAfter()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_saveStream">cb_saveStream()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_delStream">cb_delStream()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_onSubInsB4">cb_onSubInsB4()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_setSubEndTime">cb_setSubEndTime()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+</tr>
+<tr>
 <td width="33%" class="link-index"><a href="Subtle.MediaInfo.MediaInfo-class.html#cb_discover">cb_discover()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.MediaInfo.MediaInfo-class.html">MediaInfo</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_onSubsListSelect">cb_onSubsListSelect()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_setSubStartTime">cb_setSubStartTime()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_hideStreamsPane">cb_hideStreamsPane()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_onSubsWindowDelete">cb_onSubsWindowDelete()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_showStreamsPane">cb_showStreamsPane()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_hideSubPane">cb_hideSubPane()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_onSubTextEdited">cb_onSubTextEdited()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_showSubtitlePane">cb_showSubtitlePane()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_modStream">cb_modStream()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_onSubtitleEdit">cb_onSubtitleEdit()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_StreamWindowDelete">cb_StreamWindowDelete()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_newStream">cb_newStream()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_onSubtitleWindow">cb_onSubtitleWindow()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_subDel">cb_subDel()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_onModeChanged">cb_onModeChanged()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_openMediaCancel">cb_openMediaCancel()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_subIn">cb_subIn()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_onNewMenu">cb_onNewMenu()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_openMediaOpen">cb_openMediaOpen()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_subOut">cb_subOut()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_onSaveAsMenu">cb_onSaveAsMenu()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_projectSaveCancel">cb_projectSaveCancel()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#changeValueAdjustment">changeValueAdjustment()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_onSaveMenu">cb_onSaveMenu()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#cb_projectSaveOpen">cb_projectSaveOpen()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
 <td width="33%" class="link-index">&nbsp;</td>
-<td width="33%" class="link-index">&nbsp;</td>
 </tr>
-<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
 </table>
 </td></tr>
 <tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="D">D</a></h2></td>
@@ -142,6 +240,19 @@
 </tr>
 </table>
 </td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="E">E</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="Subtle.Subtle-module.html#EDITING_MODE">EDITING_MODE</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle-module.html">Subtle.Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#exposeEventVideoOut">exposeEventVideoOut()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index">&nbsp;</td>
+</tr>
+<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
+</table>
+</td></tr>
 <tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="F">F</a></h2></td>
 <td valign="top">
 <table class="link-index" width="100%" border="1">
@@ -169,21 +280,13 @@
 <tr>
 <td width="33%" class="link-index"><a href="Subtle.GPlayer.GstPlayer-class.html#get_location">get_location()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.GPlayer.GstPlayer-class.html">GstPlayer</a>)</span></td>
-<td width="33%" class="link-index"><a href="Subtle.MediaInfo.MediaInfo-class.html#getMedia">getMedia()</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle.MediaInfo.MediaInfo-class.html">MediaInfo</a>)</span></td>
-<td width="33%" class="link-index"><a href="Subtle.SubtleXML.ProjectXML-class.html#getSubtitle">getSubtitle()</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle.SubtleXML.ProjectXML-class.html">ProjectXML</a>)</span></td>
-</tr>
-<tr>
-<td width="33%" class="link-index"><a href="Subtle.GPlayer.GstPlayer-class.html#get_rate">get_rate()</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle.GPlayer.GstPlayer-class.html">GstPlayer</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.SubtleXML.ProjectXML-class.html#getMedia">getMedia()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.SubtleXML.ProjectXML-class.html">ProjectXML</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.Subtitles.Subtitles.Subtitles-class.html#getSupportedTypes">getSupportedTypes()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Subtitles.Subtitles-class.html">Subtitles</a>)</span></td>
 </tr>
 <tr>
-<td width="33%" class="link-index"><a href="Subtle.GPlayer.GstPlayer-class.html#get_state">get_state()</a><br />
+<td width="33%" class="link-index"><a href="Subtle.GPlayer.GstPlayer-class.html#get_rate">get_rate()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.GPlayer.GstPlayer-class.html">GstPlayer</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.Subtitles.Subtitles.Subtitles-class.html#getSub">getSub()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Subtitles.Subtitles-class.html">Subtitles</a>)</span></td>
@@ -191,13 +294,27 @@
 <span class="index-where">(in&nbsp;<a href="Subtle-module.html">Subtle</a>)</span></td>
 </tr>
 <tr>
-<td width="33%" class="link-index"><a href="Subtle.SubtleXML.ProjectXML-class.html#getHead">getHead()</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle.SubtleXML.ProjectXML-class.html">ProjectXML</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.GPlayer.GstPlayer-class.html#get_state">get_state()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.GPlayer.GstPlayer-class.html">GstPlayer</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.Subtitles.Sub.Sub-class.html#getSubText">getSubText()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Sub.Sub-class.html">Sub</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.GPlayer.GstPlayer-class.html">GstPlayer</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.GPlayer-module.html">Subtle.GPlayer</a>)</span></td>
 </tr>
+<tr>
+<td width="33%" class="link-index"><a href="Subtle.SubtleXML.ProjectXML-class.html#getHead">getHead()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.SubtleXML.ProjectXML-class.html">ProjectXML</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#getSubtitle">getSubtitle()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index">&nbsp;</td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="Subtle.MediaInfo.MediaInfo-class.html#getMedia">getMedia()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.MediaInfo.MediaInfo-class.html">MediaInfo</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.SubtleXML.ProjectXML-class.html#getSubtitle">getSubtitle()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.SubtleXML.ProjectXML-class.html">ProjectXML</a>)</span></td>
+<td width="33%" class="link-index">&nbsp;</td>
+</tr>
 </table>
 </td></tr>
 <tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="H">H</a></h2></td>
@@ -244,6 +361,14 @@
 <td valign="top">
 <table class="link-index" width="100%" border="1">
 <tr>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#mainFileOpen">mainFileOpen()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.MediaInfo-module.html">MediaInfo</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle-module.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.MediaInfo.Media-class.html#MIME">MIME</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.MediaInfo.Media-class.html">Media</a>)</span></td>
+</tr>
+<tr>
 <td width="33%" class="link-index"><a href="Subtle.MediaInfo.Media-class.html">Media</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.MediaInfo-module.html">Subtle.MediaInfo</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.MediaInfo.MediaInfo-class.html">MediaInfo</a><br />
@@ -251,13 +376,6 @@
 <td width="33%" class="link-index"><a href="Subtle.Subtitles.Discoverer-module.html#modules">modules</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Discoverer-module.html">Subtle.Subtitles.Discoverer</a>)</span></td>
 </tr>
-<tr>
-<td width="33%" class="link-index"><a href="Subtle.MediaInfo-module.html">MediaInfo</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle-module.html">Subtle</a>)</span></td>
-<td width="33%" class="link-index"><a href="Subtle.MediaInfo.Media-class.html#MIME">MIME</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle.MediaInfo.Media-class.html">Media</a>)</span></td>
-<td width="33%" class="link-index">&nbsp;</td>
-</tr>
 </table>
 </td></tr>
 <tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="O">O</a></h2></td>
@@ -266,11 +384,18 @@
 <tr>
 <td width="33%" class="link-index"><a href="Subtle.GPlayer.GstPlayer-class.html#on_message">on_message()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.GPlayer.GstPlayer-class.html">GstPlayer</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle-module.html#ONLINE_MODE">ONLINE_MODE</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle-module.html">Subtle.Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#openFileOpen">openFileOpen()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+</tr>
+<tr>
 <td width="33%" class="link-index"><a href="Subtle.GPlayer.GstPlayer-class.html#on_sync_message">on_sync_message()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.GPlayer.GstPlayer-class.html">GstPlayer</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#openFileCancel">openFileCancel()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
 <td width="33%" class="link-index">&nbsp;</td>
 </tr>
-<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
 </table>
 </td></tr>
 <tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="P">P</a></h2></td>
@@ -279,15 +404,32 @@
 <tr>
 <td width="33%" class="link-index"><a href="Subtle.GPlayer.GstPlayer-class.html#pause">pause()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.GPlayer.GstPlayer-class.html">GstPlayer</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#playerPlay">playerPlay()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#playerStop">playerStop()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="Subtle.GPlayer.GstPlayer-class.html#play">play()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.GPlayer.GstPlayer-class.html">GstPlayer</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#playerSeekForward">playerSeekForward()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.MediaInfo.MediaInfo-class.html#poll">poll()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.MediaInfo.MediaInfo-class.html">MediaInfo</a>)</span></td>
-<td width="33%" class="link-index">&nbsp;</td>
 </tr>
 <tr>
-<td width="33%" class="link-index"><a href="Subtle.GPlayer.GstPlayer-class.html#play">play()</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle.GPlayer.GstPlayer-class.html">GstPlayer</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#play_toggled">play_toggled()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#playerSeekRewind">playerSeekRewind()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.SubtleXML.ProjectXML-class.html">ProjectXML</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.SubtleXML-module.html">Subtle.SubtleXML</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#playerFastForward">playerFastForward()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#playerSlowMotion">playerSlowMotion()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
 <td width="33%" class="link-index">&nbsp;</td>
 </tr>
 </table>
@@ -305,84 +447,125 @@
 <tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
 </table>
 </td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="R">R</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#reorder_SubsListStore">reorder_SubsListStore()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index">&nbsp;</td>
+<td width="33%" class="link-index">&nbsp;</td>
+</tr>
+<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
+</table>
+</td></tr>
 <tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="S">S</a></h2></td>
 <td valign="top">
 <table class="link-index" width="100%" border="1">
 <tr>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#saveProject">saveProject()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtitles.Formats.Softni-module.html">Softni</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Formats-module.html">Subtle.Subtitles.Formats</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#subsWindowUpdate">subsWindowUpdate()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+</tr>
+<tr>
 <td width="33%" class="link-index"><a href="Subtle.GPlayer.GstPlayer-class.html#seek">seek()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.GPlayer.GstPlayer-class.html">GstPlayer</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtitles.Formats.Softni.Softni-class.html">Softni</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Formats.Softni-module.html">Subtle.Subtitles.Formats.Softni</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtitles-module.html">Subtitles</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle-module.html">Subtle</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="Subtle.GPlayer.GstPlayer-class.html#set_location">set_location()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.GPlayer.GstPlayer-class.html">GstPlayer</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.MediaInfo.Media-class.html#sourceURI">sourceURI</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.MediaInfo.Media-class.html">Media</a>)</span></td>
-<td width="33%" class="link-index"><a href="Subtle.Subtitles.Formats.SubRip.SubRip-class.html#subSave">subSave()</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Formats.SubRip.SubRip-class.html">SubRip</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtitles.Subtitles-module.html">Subtitles</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtitles-module.html">Subtle.Subtitles</a>)</span></td>
 </tr>
 <tr>
-<td width="33%" class="link-index"><a href="Subtle.GPlayer.GstPlayer-class.html#set_location">set_location()</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle.GPlayer.GstPlayer-class.html">GstPlayer</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.GPlayer.VideoWidget-class.html#set_sink">set_sink()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.GPlayer.VideoWidget-class.html">VideoWidget</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.GPlayer.GstPlayer-class.html#stop">stop()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.GPlayer.GstPlayer-class.html">GstPlayer</a>)</span></td>
-<td width="33%" class="link-index"><a href="Subtle.Subtitles-module.html">Subtitles</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle-module.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtitles.Subtitles.Subtitles-class.html">Subtitles</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Subtitles-module.html">Subtle.Subtitles.Subtitles</a>)</span></td>
 </tr>
 <tr>
-<td width="33%" class="link-index"><a href="Subtle.GPlayer.VideoWidget-class.html#set_sink">set_sink()</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle.GPlayer.VideoWidget-class.html">VideoWidget</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.GPlayer.GstPlayer-class.html#set_subtitle_text">set_subtitle_text()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.GPlayer.GstPlayer-class.html">GstPlayer</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.Subtitles.Sub-module.html">Sub</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.Subtitles-module.html">Subtle.Subtitles</a>)</span></td>
-<td width="33%" class="link-index"><a href="Subtle.Subtitles.Subtitles-module.html">Subtitles</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle.Subtitles-module.html">Subtle.Subtitles</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle-module.html">Subtle</a></td>
 </tr>
 <tr>
-<td width="33%" class="link-index"><a href="Subtle.GPlayer.GstPlayer-class.html#set_subtitle_text">set_subtitle_text()</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle.GPlayer.GstPlayer-class.html">GstPlayer</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#setSubEndTime">setSubEndTime()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.Subtitles.Sub.Sub-class.html">Sub</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Sub-module.html">Subtle.Subtitles.Sub</a>)</span></td>
-<td width="33%" class="link-index"><a href="Subtle.Subtitles.Subtitles.Subtitles-class.html">Subtitles</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Subtitles-module.html">Subtle.Subtitles.Subtitles</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle-module.html">Subtle</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle-module.html">Subtle</a>)</span></td>
 </tr>
 <tr>
-<td width="33%" class="link-index"><a href="Subtle.Subtitles.Sub.Sub-class.html#setSubText">setSubText()</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Sub.Sub-class.html">Sub</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#setSubStartTime">setSubStartTime()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.Subtitles.Subtitles.Subtitles-class.html#subAdd">subAdd()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Subtitles.Subtitles-class.html">Subtitles</a>)</span></td>
-<td width="33%" class="link-index"><a href="Subtle-module.html">Subtle</a></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html">Subtle</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle-module.html">Subtle.Subtle</a>)</span></td>
 </tr>
 <tr>
-<td width="33%" class="link-index"><a href="Subtle.GPlayer.GstPlayer-class.html#slow_motion">slow_motion()</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle.GPlayer.GstPlayer-class.html">GstPlayer</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtitles.Sub.Sub-class.html#setSubText">setSubText()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Sub.Sub-class.html">Sub</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.Subtitles.Subtitles.Subtitles-class.html#subDel">subDel()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Subtitles.Subtitles-class.html">Subtitles</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.SubtleXML-module.html">SubtleXML</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle-module.html">Subtle</a>)</span></td>
 </tr>
 <tr>
-<td width="33%" class="link-index"><a href="Subtle.Subtitles.Formats.Softni-module.html">Softni</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Formats-module.html">Subtle.Subtitles.Formats</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#setSubtitle">setSubtitle()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.Subtitles.Formats.SubRip-module.html">SubRip</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Formats-module.html">Subtle.Subtitles.Formats</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.Subtitles.Subtitles.Subtitles-class.html#subUpdate">subUpdate()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Subtitles.Subtitles-class.html">Subtitles</a>)</span></td>
 </tr>
 <tr>
-<td width="33%" class="link-index"><a href="Subtle.Subtitles.Formats.Softni.Softni-class.html">Softni</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Formats.Softni-module.html">Subtle.Subtitles.Formats.Softni</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#setSubtitleEdit">setSubtitleEdit()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.Subtitles.Formats.SubRip.SubRip-class.html">SubRip</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Formats.SubRip-module.html">Subtle.Subtitles.Formats.SubRip</a>)</span></td>
 <td width="33%" class="link-index">&nbsp;</td>
 </tr>
+<tr>
+<td width="33%" class="link-index"><a href="Subtle.GPlayer.GstPlayer-class.html#slow_motion">slow_motion()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.GPlayer.GstPlayer-class.html">GstPlayer</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtitles.Formats.SubRip.SubRip-class.html#subSave">subSave()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Formats.SubRip.SubRip-class.html">SubRip</a>)</span></td>
+<td width="33%" class="link-index">&nbsp;</td>
+</tr>
 </table>
 </td></tr>
 <tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="U">U</a></h2></td>
 <td valign="top">
 <table class="link-index" width="100%" border="1">
 <tr>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#update_scale_cb">update_scale_cb()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#updateStreamWindow">updateStreamWindow()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index">&nbsp;</td>
+</tr>
+<tr>
 <td width="33%" class="link-index"><a href="Subtle.Subtitles.Subtitles.Subtitles-class.html#updateKeys">updateKeys()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Subtitles.Subtitles-class.html">Subtitles</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.Subtitles.Subtitles.Subtitles-class.html#updateText">updateText()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Subtitles.Subtitles-class.html">Subtitles</a>)</span></td>
 <td width="33%" class="link-index">&nbsp;</td>
 </tr>
-<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
 </table>
 </td></tr>
 <tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="V">V</a></h2></td>
@@ -426,47 +609,48 @@
 <span class="index-where">(in&nbsp;<a href="Subtle.GPlayer.GstPlayer-class.html">GstPlayer</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.Subtitles.Sub.Sub-class.html#__init__">__init__()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Sub.Sub-class.html">Sub</a>)</span></td>
-<td width="33%" class="link-index"><a href="Subtle.Subtitles.Formats.Softni.Softni-class.html#_softniFormat2Frame">_softniFormat2Frame()</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Formats.Softni.Softni-class.html">Softni</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtitles.Sub.Sub-class.html#_processText">_processText()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Sub.Sub-class.html">Sub</a>)</span></td>
 </tr>
 <tr>
 <td width="33%" class="link-index"><a href="Subtle.GPlayer.VideoWidget-class.html#__init__">__init__()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.GPlayer.VideoWidget-class.html">VideoWidget</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.Subtitles.Subtitles.Subtitles-class.html#__init__">__init__()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Subtitles.Subtitles-class.html">Subtitles</a>)</span></td>
-<td width="33%" class="link-index"><a href="Subtle.Subtitles.Formats.Softni.Softni-class.html#_softniFormat2Timestamp">_softniFormat2Timestamp()</a><br />
+<td width="33%" class="link-index"><a href="Subtle.Subtitles.Formats.Softni.Softni-class.html#_softniFormat2Frame">_softniFormat2Frame()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Formats.Softni.Softni-class.html">Softni</a>)</span></td>
 </tr>
 <tr>
 <td width="33%" class="link-index"><a href="Subtle.MediaInfo.MediaInfo-class.html#__init__">__init__()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.MediaInfo.MediaInfo-class.html">MediaInfo</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtle.Subtle-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtle.Subtle-class.html">Subtle</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtitles.Formats.Softni.Softni-class.html#_softniFormat2Timestamp">_softniFormat2Timestamp()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Formats.Softni.Softni-class.html">Softni</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="Subtle.Subtitles.Formats.Softni.Softni-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Formats.Softni.Softni-class.html">Softni</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.SubtleXML.ProjectXML-class.html#__init__">__init__()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.SubtleXML.ProjectXML-class.html">ProjectXML</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.Subtitles.Formats.SubRip.SubRip-class.html#_subSRTLoadFromString">_subSRTLoadFromString()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Formats.SubRip.SubRip-class.html">SubRip</a>)</span></td>
 </tr>
 <tr>
-<td width="33%" class="link-index"><a href="Subtle.Subtitles.Formats.Softni.Softni-class.html#__init__">__init__()</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Formats.Softni.Softni-class.html">Softni</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtitles.Formats.SubRip.SubRip-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Formats.SubRip.SubRip-class.html">SubRip</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.Subtitles.Line.Line-class.html#_count">_count()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Line.Line-class.html">Line</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.Subtitles.Formats.SubRip.SubRip-class.html#_subTime2SRTtime">_subTime2SRTtime()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Formats.SubRip.SubRip-class.html">SubRip</a>)</span></td>
 </tr>
 <tr>
-<td width="33%" class="link-index"><a href="Subtle.Subtitles.Formats.SubRip.SubRip-class.html#__init__">__init__()</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Formats.SubRip.SubRip-class.html">SubRip</a>)</span></td>
+<td width="33%" class="link-index"><a href="Subtle.Subtitles.Line.Line-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Line.Line-class.html">Line</a>)</span></td>
 <td width="33%" class="link-index"><a href="Subtle.Subtitles.Formats.Softni.Softni-class.html#_loadFromFile">_loadFromFile()</a><br />
 <span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Formats.Softni.Softni-class.html">Softni</a>)</span></td>
 <td width="33%" class="link-index">&nbsp;</td>
 </tr>
-<tr>
-<td width="33%" class="link-index"><a href="Subtle.Subtitles.Line.Line-class.html#__init__">__init__()</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Line.Line-class.html">Line</a>)</span></td>
-<td width="33%" class="link-index"><a href="Subtle.Subtitles.Sub.Sub-class.html#_processText">_processText()</a><br />
-<span class="index-where">(in&nbsp;<a href="Subtle.Subtitles.Sub.Sub-class.html">Sub</a>)</span></td>
-<td width="33%" class="link-index">&nbsp;</td>
-</tr>
 </table>
 </td></tr>
 </table>
@@ -501,7 +685,7 @@
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Fri Aug  8 22:14:07 2008
+    Generated by Epydoc 3.0.1 on Fri Aug  8 22:42:29 2008
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"

Modified: trunk/subtle/docs/html/module-tree.html
===================================================================
--- trunk/subtle/docs/html/module-tree.html	2008-08-09 01:32:21 UTC (rev 15171)
+++ trunk/subtle/docs/html/module-tree.html	2008-08-09 01:48:27 UTC (rev 15172)
@@ -78,6 +78,7 @@
     <li> <strong class="uidlink"><a href="Subtle.Subtitles.Subtitles-module.html">Subtle.Subtitles.Subtitles</a></strong>    </li>
     </ul>
     </li>
+    <li> <strong class="uidlink"><a href="Subtle.Subtle-module.html">Subtle.Subtle</a></strong>    </li>
     <li> <strong class="uidlink"><a href="Subtle.SubtleXML-module.html">Subtle.SubtleXML</a></strong>    </li>
     </ul>
     </li>
@@ -113,7 +114,7 @@
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Fri Aug  8 22:14:07 2008
+    Generated by Epydoc 3.0.1 on Fri Aug  8 22:42:29 2008
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"

Modified: trunk/subtle/docs/html/redirect.html
===================================================================
--- trunk/subtle/docs/html/redirect.html	2008-08-09 01:32:21 UTC (rev 15171)
+++ trunk/subtle/docs/html/redirect.html	2008-08-09 01:48:27 UTC (rev 15172)
@@ -7,7 +7,7 @@
 <body>
 <script type="text/javascript">
 <!--
-var pages = ["Subtle.Subtitles.Formats.Softni.Softni-c", "Subtle.Subtitles.Formats.SubRip.SubRip-c", "Subtle.Subtitles.Subtitles.Subtitles-c", "Subtle.Subtitles.Formats.Softni-m", "Subtle.Subtitles.Formats.SubRip-m", "Subtle.Subtitles.Discoverer-m", "Subtle.SubtleXML.ProjectXML-c", "Subtle.Subtitles.Subtitles-m", "Subtle.GPlayer.VideoWidget-c", "Subtle.MediaInfo.MediaInfo-c", "Subtle.Subtitles.Line.Line-c", "Subtle.Subtitles.Formats-m", "Subtle.GPlayer.GstPlayer-c", "Subtle.Subtitles.Sub.Sub-c", "Subtle.MediaInfo.Media-c", "Subtle.Subtitles.Line-m", "Subtle.Subtitles.Sub-m", "Subtle.MediaInfo-m", "Subtle.Subtitles-m", "Subtle.SubtleXML-m", "Subtle.GPlayer-m", "Subtle-m"];
+var pages = ["Subtle.Subtitles.Formats.Softni.Softni-c", "Subtle.Subtitles.Formats.SubRip.SubRip-c", "Subtle.Subtitles.Subtitles.Subtitles-c", "Subtle.Subtitles.Formats.Softni-m", "Subtle.Subtitles.Formats.SubRip-m", "Subtle.Subtitles.Discoverer-m", "Subtle.SubtleXML.ProjectXML-c", "Subtle.Subtitles.Subtitles-m", "Subtle.GPlayer.VideoWidget-c", "Subtle.MediaInfo.MediaInfo-c", "Subtle.Subtitles.Line.Line-c", "Subtle.Subtitles.Formats-m", "Subtle.GPlayer.GstPlayer-c", "Subtle.Subtitles.Sub.Sub-c", "Subtle.MediaInfo.Media-c", "Subtle.Subtitles.Line-m", "Subtle.Subtitles.Sub-m", "Subtle.Subtle.Subtle-c", "Subtle.MediaInfo-m", "Subtle.Subtitles-m", "Subtle.SubtleXML-m", "Subtle.GPlayer-m", "Subtle.Subtle-m", "Subtle-m"];
 var dottedName = get_anchor();
 if (dottedName) {
     var target = redirect_url(dottedName);

Modified: trunk/subtle/docs/html/toc-everything.html
===================================================================
--- trunk/subtle/docs/html/toc-everything.html	2008-08-09 01:32:21 UTC (rev 15171)
+++ trunk/subtle/docs/html/toc-everything.html	2008-08-09 01:48:27 UTC (rev 15172)
@@ -22,7 +22,8 @@
      >Subtle.Subtitles.Formats.SubRip.SubRip</a><br />    <a target="mainFrame" href="Subtle.Subtitles.Line.Line-class.html"
      >Subtle.Subtitles.Line.Line</a><br />    <a target="mainFrame" href="Subtle.Subtitles.Sub.Sub-class.html"
      >Subtle.Subtitles.Sub.Sub</a><br />    <a target="mainFrame" href="Subtle.Subtitles.Subtitles.Subtitles-class.html"
-     >Subtle.Subtitles.Subtitles.Subtitles</a><br />    <a target="mainFrame" href="Subtle.SubtleXML.ProjectXML-class.html"
+     >Subtle.Subtitles.Subtitles.Subtitles</a><br />    <a target="mainFrame" href="Subtle.Subtle.Subtle-class.html"
+     >Subtle.Subtle.Subtle</a><br />    <a target="mainFrame" href="Subtle.SubtleXML.ProjectXML-class.html"
      >Subtle.SubtleXML.ProjectXML</a><br />  <h2 class="toc">All Functions</h2>
     <a target="mainFrame" href="Subtle.Subtitles.Discoverer-module.html#discoverer"
      >Subtle.Subtitles.Discoverer.discoverer</a><br />    <a target="mainFrame" href="Subtle.Subtitles.Formats.Softni-module.html#discover"
@@ -33,7 +34,9 @@
      >Subtle.Subtitles.Discoverer.format_path</a><br />    <a target="mainFrame" href="Subtle.Subtitles.Discoverer-module.html#modules"
      >Subtle.Subtitles.Discoverer.modules</a><br />    <a target="mainFrame" href="Subtle.Subtitles.Formats.Softni-module.html#FRAMERATE"
      >Subtle.Subtitles.Formats.Softni.FRAMERATE</a><br />    <a target="mainFrame" href="Subtle.Subtitles.Formats.SubRip-module.html#FRAMERATE"
-     >Subtle.Subtitles.Formats.SubRip.FRAMERATE</a><br /><hr />
+     >Subtle.Subtitles.Formats.SubRip.FRAMERATE</a><br />    <a target="mainFrame" href="Subtle.Subtle-module.html#EDITING_MODE"
+     >Subtle.Subtle.EDITING_MODE</a><br />    <a target="mainFrame" href="Subtle.Subtle-module.html#ONLINE_MODE"
+     >Subtle.Subtle.ONLINE_MODE</a><br /><hr />
 <span class="options">[<a href="javascript:void(0);" class="privatelink"
     onclick="toggle_private();">hide&nbsp;private</a>]</span>
 

Modified: trunk/subtle/docs/html/toc.html
===================================================================
--- trunk/subtle/docs/html/toc.html	2008-08-09 01:32:21 UTC (rev 15171)
+++ trunk/subtle/docs/html/toc.html	2008-08-09 01:48:27 UTC (rev 15172)
@@ -26,7 +26,8 @@
      onclick="setFrame('toc-Subtle.Subtitles.Formats.SubRip-module.html','Subtle.Subtitles.Formats.SubRip-module.html');"     >Subtle.Subtitles.Formats.SubRip</a><br />    <a target="moduleFrame" href="toc-Subtle.Subtitles.Line-module.html"
      onclick="setFrame('toc-Subtle.Subtitles.Line-module.html','Subtle.Subtitles.Line-module.html');"     >Subtle.Subtitles.Line</a><br />    <a target="moduleFrame" href="toc-Subtle.Subtitles.Sub-module.html"
      onclick="setFrame('toc-Subtle.Subtitles.Sub-module.html','Subtle.Subtitles.Sub-module.html');"     >Subtle.Subtitles.Sub</a><br />    <a target="moduleFrame" href="toc-Subtle.Subtitles.Subtitles-module.html"
-     onclick="setFrame('toc-Subtle.Subtitles.Subtitles-module.html','Subtle.Subtitles.Subtitles-module.html');"     >Subtle.Subtitles.Subtitles</a><br />    <a target="moduleFrame" href="toc-Subtle.SubtleXML-module.html"
+     onclick="setFrame('toc-Subtle.Subtitles.Subtitles-module.html','Subtle.Subtitles.Subtitles-module.html');"     >Subtle.Subtitles.Subtitles</a><br />    <a target="moduleFrame" href="toc-Subtle.Subtle-module.html"
+     onclick="setFrame('toc-Subtle.Subtle-module.html','Subtle.Subtle-module.html');"     >Subtle.Subtle</a><br />    <a target="moduleFrame" href="toc-Subtle.SubtleXML-module.html"
      onclick="setFrame('toc-Subtle.SubtleXML-module.html','Subtle.SubtleXML-module.html');"     >Subtle.SubtleXML</a><br /><hr />
   <span class="options">[<a href="javascript:void(0);" class="privatelink"
     onclick="toggle_private();">hide&nbsp;private</a>]</span>



More information about the commits mailing list