changes for new config
[enigma2.git] / lib / python / Plugins / Extensions / CutListEditor / plugin.py
index a5adc51affbed4666f1823a365dc724c02d19907..28ed7d64c8df8c5dd7645f18d1dcc349d6a91703 100644 (file)
@@ -26,6 +26,8 @@ def CutListEntry(where, what):
                type = "OUT"
        elif what == 2:
                type = "MARK"
+       elif what == 3:
+               type = "LAST"
        res.append(MultiContentEntryText(size=(400, 20), text = "%dh:%02dm:%02ds:%03d" % (h, m, s, ms)))
        res.append(MultiContentEntryText(pos=(400,0), size=(130, 20), text = type, flags = RT_HALIGN_RIGHT))
 
@@ -111,21 +113,17 @@ class CutList(GUIComponent):
        def getCurrentIndex(self):
                return self.l.getCurrentSelectionIndex()
        
-       def GUIcreate(self, parent):
-               self.instance = eListbox(parent)
-               self.instance.setContent(self.l)
-               self.instance.setItemHeight(30)
-               self.instance.selectionChanged.get().append(self.selectionChanged)
+       GUI_WIDGET = eListbox
+       
+       def postWidgetCreate(self, instance):
+               instance.setContent(self.l)
+               instance.setItemHeight(30)
+               instance.selectionChanged.get().append(self.selectionChanged)
 
        def selectionChanged(self):
                for x in self.onSelectionChanged:
                        x()
        
-       def GUIdelete(self):
-               self.instance.selectionChanged.get().remove(self.selectionChanged)
-               self.instance.setContent(None)
-               self.instance = None
-       
        def invalidateEntry(self, index):
                self.l.invalidateEntry(index)
        
@@ -145,7 +143,7 @@ class CutListEditor(Screen, InfoBarSeek, InfoBarCueSheetSupport):
        skin = """
                <screen position="100,100" size="550,400" title="Test" >
                        <widget name="Timeline" position="10,0" size="530,40" 
-                               pointer="/usr/share/enigma2/position_pointer.png:3,5" />
+                               pointer="/usr/share/enigma2/position_pointer.png:3,5" foregroundColor="#225b7395" />
                        <widget name="Cutlist" position="10,50" size="530,300" scrollbarMode="showOnDemand" />
                </screen>"""
        def __init__(self, session, service):
@@ -178,7 +176,7 @@ class CutListEditor(Screen, InfoBarSeek, InfoBarCueSheetSupport):
                                "removeMark": (self.__removeMark, _("Remove a mark")),
                                "leave": (self.exit, _("Exit editor")),
                                "showMenu": self.showMenu,
-                       })
+                       }, prio=-4)
                
                self.tutorial_seen = False