always show timeshift state when infobar is visible (not only when state is
[enigma2.git] / lib / python / Screens / InfoBarGenerics.py
index 9e8e20b65ce2179554c207ae573ac58ae81b4551..571947915f0ec37d3b97d78e4168fbde82272491 100644 (file)
@@ -860,14 +860,15 @@ class InfoBarSeek:
 from Screens.PVRState import PVRState, TimeshiftState
 
 class InfoBarPVRState:
-       def __init__(self, screen=PVRState):
+       def __init__(self, screen=PVRState, show_always=False):
+               self.show_always = show_always
                self.onPlayStateChanged.append(self.__playStateChanged)
                self.pvrStateDialog = self.session.instantiateDialog(screen)
                self.onShow.append(self.__mayShow)
                self.onHide.append(self.pvrStateDialog.hide)
        
        def __mayShow(self):
-               if self.seekstate != self.SEEK_STATE_PLAY and self.execing:
+               if self.execing and (self.show_always or self.seekstate != self.SEEK_STATE_PLAY):
                        self.pvrStateDialog.show()
 
        def __playStateChanged(self, state):
@@ -877,7 +878,7 @@ class InfoBarPVRState:
 
 class InfoBarTimeshiftState(InfoBarPVRState):
        def __init__(self):
-               InfoBarPVRState.__init__(self, screen=TimeshiftState)
+               InfoBarPVRState.__init__(self, screen=TimeshiftState, show_always=True)
 
 class InfoBarShowMovies:
 
@@ -1891,12 +1892,12 @@ class InfoBarServiceErrorPopupSupport:
                        eDVBServicePMTHandler.eventSOF: None,
                        eDVBServicePMTHandler.eventEOF: None
                }
-               
+
                if error not in errors:
                        error = None
 
-               error = error and errors[error]
-               
+               error = error is not None and errors[error]
+
                if error is not None:
                        Notifications.AddPopup(text = error, type = MessageBox.TYPE_ERROR, timeout = 5, id = "ZapError")
                else: