Components/-{ChoiceList.py, EpgList.py, FileList.py, MediaPlayer.py, ParentalControl...
[enigma2.git] / lib / python / Screens / InfoBarGenerics.py
index bfeb394bda2abb326a49da26d8068b20dcf69390..2cbfeb733819faceecff80e23feecbe0982297a9 100644 (file)
@@ -24,7 +24,6 @@ from Screens.TimerSelection import TimerSelection
 from Screens.PictureInPicture import PictureInPicture
 from Screens.SubtitleDisplay import SubtitleDisplay
 from Screens.RdsDisplay import RdsInfoDisplay, RassInteractive
-from Screens.SleepTimerEdit import SleepTimerEdit
 from Screens.TimeDateInput import TimeDateInput
 from ServiceReference import ServiceReference
 
@@ -1356,25 +1355,21 @@ class InfoBarJobman:
        def JobViewCB(self, in_background):
                job_manager.in_background = in_background
 
-# depends on InfoBarExtensions
-class InfoBarSleepTimer:
-       def __init__(self):
-               self.addExtension((self.getSleepTimerName, self.showSleepTimerSetup, lambda: True), "1")
-
-       def getSleepTimerName(self):
-               return _("Sleep Timer")
-
-       def showSleepTimerSetup(self):
-               self.session.open(SleepTimerEdit)
-
 # depends on InfoBarExtensions
 class InfoBarPiP:
        def __init__(self):
-               self.session.pipshown = False
+               try:
+                       self.session.pipshown
+               except:
+                       self.session.pipshown = False
                if SystemInfo.get("NumVideoDecoders", 1) > 1:
-                       self.addExtension((self.getShowHideName, self.showPiP, lambda: True), "blue")
-                       self.addExtension((self.getMoveName, self.movePiP, self.pipShown), "green")
-                       self.addExtension((self.getSwapName, self.swapPiP, self.pipShown), "yellow")
+                       if (self.allowPiP):
+                               self.addExtension((self.getShowHideName, self.showPiP, lambda: True), "blue")
+                               self.addExtension((self.getMoveName, self.movePiP, self.pipShown), "green")
+                               self.addExtension((self.getSwapName, self.swapPiP, self.pipShown), "yellow")
+                       else:
+                               self.addExtension((self.getShowHideName, self.showPiP, self.pipShown), "blue")
+                               self.addExtension((self.getMoveName, self.movePiP, self.pipShown), "green")
 
        def pipShown(self):
                return self.session.pipshown
@@ -1603,21 +1598,21 @@ class InfoBarInstantRecord:
                if self.isInstantRecordRunning():
                        self.session.openWithCallback(self.recordQuestionCallback, ChoiceBox, \
                                title=_("A recording is currently running.\nWhat do you want to do?"), \
-                               list=((_("add recording (stop after current event)"), "event"), \
+                               list=((_("stop recording"), "stop"), \
+                               (_("add recording (stop after current event)"), "event"), \
+                               (_("add recording (indefinitely)"), "indefinitely"), \
                                (_("add recording (enter recording duration)"), "manualduration"), \
                                (_("add recording (enter recording endtime)"), "manualendtime"), \
-                               (_("add recording (indefinitely)"), "indefinitely"), \
                                (_("change recording (duration)"), "changeduration"), \
                                (_("change recording (endtime)"), "changeendtime"), \
-                               (_("stop recording"), "stop"), \
                                (_("do nothing"), "no")))
                else:
                        self.session.openWithCallback(self.recordQuestionCallback, ChoiceBox, \
                                title=_("Start recording?"), \
                                list=((_("add recording (stop after current event)"), "event"), \
+                               (_("add recording (indefinitely)"), "indefinitely"), \
                                (_("add recording (enter recording duration)"), "manualduration"), \
                                (_("add recording (enter recording endtime)"), "manualendtime"), \
-                               (_("add recording (indefinitely)"), "indefinitely"), \
                                (_("don't record"), "no")))
 
 from Tools.ISO639 import LanguageCodes