X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/55c5507b87875f8cd0fbfaf635b1e0342561b868..5e942862b2017443ec34831f649f890f8215a534:/lib/python/Plugins/Extensions/CutListEditor/plugin.py diff --git a/lib/python/Plugins/Extensions/CutListEditor/plugin.py b/lib/python/Plugins/Extensions/CutListEditor/plugin.py index 024c8889..76a7bdc8 100644 --- a/lib/python/Plugins/Extensions/CutListEditor/plugin.py +++ b/lib/python/Plugins/Extensions/CutListEditor/plugin.py @@ -4,7 +4,6 @@ from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Components.ServicePosition import ServicePositionGauge from Components.ActionMap import HelpableActionMap -from Components.MenuList import MenuList from Components.MultiContent import MultiContentEntryText from Components.ServiceEventTracker import ServiceEventTracker from Components.VideoWindow import VideoWindow @@ -12,6 +11,7 @@ from Screens.InfoBarGenerics import InfoBarSeek, InfoBarCueSheetSupport, InfoBar from Components.GUIComponent import GUIComponent from enigma import eListboxPythonMultiContent, eListbox, gFont, iPlayableService, RT_HALIGN_RIGHT from Screens.FixedMenu import FixedMenu +from Screens.HelpMenu import HelpableScreen import bisect def CutListEntry(where, what): @@ -121,6 +121,10 @@ class CutList(GUIComponent): instance.setItemHeight(30) instance.selectionChanged.get().append(self.selectionChanged) + def preWidgetRemove(self, instance): + instance.setContent(None) + instance.selectionChanged.get().remove(self.selectionChanged) + def selectionChanged(self): for x in self.onSelectionChanged: x() @@ -140,7 +144,7 @@ class CutList(GUIComponent): if self.instance is not None: self.instance.moveSelectionTo(index) -class CutListEditor(Screen, InfoBarSeek, InfoBarCueSheetSupport, InfoBarServiceName): +class CutListEditor(Screen, InfoBarSeek, InfoBarCueSheetSupport, InfoBarServiceName, HelpableScreen): skin = """ @@ -157,8 +161,8 @@ class CutListEditor(Screen, InfoBarSeek, InfoBarCueSheetSupport, InfoBarServiceN PositionDetailed - + """ def __init__(self, session, service): @@ -167,6 +171,7 @@ class CutListEditor(Screen, InfoBarSeek, InfoBarCueSheetSupport, InfoBarServiceN InfoBarSeek.__init__(self, actionmap = "CutlistSeekActions") InfoBarCueSheetSupport.__init__(self) InfoBarServiceName.__init__(self) + HelpableScreen.__init__(self) self.old_service = session.nav.getCurrentlyPlayingServiceReference() session.nav.playService(service) @@ -193,7 +198,7 @@ class CutListEditor(Screen, InfoBarSeek, InfoBarCueSheetSupport, InfoBarServiceN "addMark": (self.__addMark, _("Add a mark")), "removeMark": (self.__removeMark, _("Remove a mark")), "leave": (self.exit, _("Exit editor")), - "showMenu": self.showMenu, + "showMenu": (self.showMenu, _("menu")), }, prio=-4) self.tutorial_seen = False @@ -212,7 +217,7 @@ class CutListEditor(Screen, InfoBarSeek, InfoBarCueSheetSupport, InfoBarServiceN if not self.tutorial_seen: self.tutorial_seen = True self.session.open(MessageBox, - """Welcome to the Cutlist editor. It's still a bit strange to use, but anyway: + """Welcome to the Cutlist editor. Seek to the start of the stuff you want to cut away. Press OK, select 'start cut'. @@ -391,7 +396,7 @@ Then seek to the end, press OK, select 'end cut'. That's it. # we modify the "play" behaviour a bit: # if we press pause while being in slowmotion, we will pause (and not play) def playpauseService(self): - if self.seekstate not in [self.SEEK_STATE_PLAY, self.SEEK_STATE_SM_HALF, self.SEEK_STATE_SM_QUARTER, self.SEEK_STATE_SM_EIGHTH]: + if self.seekstate != self.SEEK_STATE_PLAY and not self.isStateSlowMotion(self.seekstate): self.unPauseService() else: self.pauseService()