looking for the sleep timer? just forgot to add it to the infobar :)
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Mon, 13 Nov 2006 00:18:51 +0000 (00:18 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Mon, 13 Nov 2006 00:18:51 +0000 (00:18 +0000)
lib/python/Screens/InfoBarGenerics.py

index 8224d20d936cc59396594037befe91b12132e153..62d4e969be45715602cdaa8b67443c5862e342a9 100644 (file)
@@ -32,6 +32,7 @@ from Screens.MinuteInput import MinuteInput
 from Screens.TimerSelection import TimerSelection
 from Screens.PictureInPicture import PictureInPicture
 from Screens.SubtitleDisplay import SubtitleDisplay
+from Screens.SleepTimerEdit import SleepTimerEdit
 from ServiceReference import ServiceReference
 
 from Tools import Notifications
@@ -1120,7 +1121,6 @@ class InfoBarPlugins:
        def __init__(self):
                self.addExtension(extension = self.getPluginList, type = InfoBarExtensions.EXTENSION_LIST)
                
-               
        def getPluginName(self, name):
                return name
                
@@ -1133,6 +1133,20 @@ class InfoBarPlugins:
        def runPlugin(self, plugin):
                plugin(session = self.session)
 
+# depends on InfoBarExtensions
+class InfoBarSleepTimer:
+       def __init__(self):
+               self.addExtension((self.getSleepTimerName, self.showSleepTimerSetup, self.available), "1")      
+               
+       def available(self):
+               return True
+
+       def getSleepTimerName(self):
+               return _("Sleep Timer")
+
+       def showSleepTimerSetup(self):
+               self.session.open(SleepTimerEdit)
+
 # depends on InfoBarExtensions
 class InfoBarPiP:
        def __init__(self):