X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fpython%2FScreens%2FTaskView.py;h=9907e2fb5cd87100e37cd30ba9471693e1888e2a;hp=eb926ca3acf9615501bd214b178cfbf1c8eefa48;hb=453af6ce0630079409e4245c6f7c74a117ee3de2;hpb=786a5a906d13ec5832fbecf5c4fa5421f2cac790 diff --git a/lib/python/Screens/TaskView.py b/lib/python/Screens/TaskView.py index eb926ca..9907e2f 100644 --- a/lib/python/Screens/TaskView.py +++ b/lib/python/Screens/TaskView.py @@ -7,7 +7,7 @@ import Screens.Standby from Tools import Notifications class JobView(InfoBarNotifications, Screen, ConfigListScreen): - def __init__(self, session, job, parent=None, cancelable = True, backgroundable = True, afterEvent = 0): + def __init__(self, session, job, parent=None, cancelable = True, backgroundable = True): from Components.Sources.StaticText import StaticText from Components.Sources.Progress import Progress from Components.Sources.Boolean import Boolean @@ -43,19 +43,20 @@ class JobView(InfoBarNotifications, Screen, ConfigListScreen): "ok": self.ok, }, -2) - self.afterevents = [ "nothing", "standby", "deepstandby", "close" ] self.settings = ConfigSubsection() if SystemInfo["DeepstandbySupport"]: shutdownString = _("go to deep standby") else: shutdownString = _("shut down") - self.settings.afterEvent = ConfigSelection(choices = [("nothing", _("do nothing")), ("close", _("Close")), ("standby", _("go to standby")), ("deepstandby", shutdownString)], default = self.afterevents[afterEvent]) + self.settings.afterEvent = ConfigSelection(choices = [("nothing", _("do nothing")), ("close", _("Close")), ("standby", _("go to standby")), ("deepstandby", shutdownString)], default = self.job.afterEvent or "nothing") + self.job.afterEvent = self.settings.afterEvent.getValue() self.setupList() self.state_changed() def setupList(self): self["config"].setList( [ getConfigListEntry(_("After event"), self.settings.afterEvent) ]) - + self.job.afterEvent = self.settings.afterEvent.getValue() + def keyLeft(self): ConfigListScreen.keyLeft(self) self.setupList()