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))
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)
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):
"removeMark": (self.__removeMark, _("Remove a mark")),
"leave": (self.exit, _("Exit editor")),
"showMenu": self.showMenu,
- })
+ }, prio=-4)
self.tutorial_seen = False
pass
def setType(self, index, type):
- self.cut_list[index] = (self.cut_list[index][0], type)
- self["Cutlist"].setIndex(index, CutListEntry(*self.cut_list[index]))
+ if len(self.cut_list):
+ self.cut_list[index] = (self.cut_list[index][0], type)
+ self["Cutlist"].setIndex(index, CutListEntry(*self.cut_list[index]))
def setIn(self):
m = self["Cutlist"].getCurrentIndex()