fix PIP
[enigma2.git] / lib / python / Screens / InfoBarGenerics.py
index 99f6ba0c3b9fbd4b280425b7ad77224e9e5a2645..978e73198391ed0d051518ebada89f71b5e4ae76 100644 (file)
@@ -406,8 +406,16 @@ class InfoBarEPG:
                self["EPGActions"] = HelpableActionMap(self, "InfobarEPGActions", 
                        {
                                "showEventInfo": (self.openEventView, _("show EPG...")),
+                               "showInfobarOrEpgWhenInfobarAlreadyVisible": self.showEventInfoWhenNotVisible,
                        })
 
+       def showEventInfoWhenNotVisible(self):
+               if self.shown:
+                       self.openEventView()
+               else:
+                       self.toggleShow()
+                       return 1
+
        def zapToService(self, service):
                if not service is None:
                        if self.servicelist.getRoot() != self.epg_bouquet: #already in correct bouquet?
@@ -638,8 +646,7 @@ class InfoBarSeek:
                                if action[:5] == "seek:":
                                        time = int(action[5:])
                                        self.screen.seekRelative(time * 90000)
-                                       if isinstance(self.screen, InfoBarShowHide):
-                                               self.screen.doShow()
+                                       self.screen.showAfterSeek()
                                        return 1
                                else:
                                        return HelpableActionMap.action(self, contexts, action)
@@ -667,6 +674,10 @@ class InfoBarSeek:
 
                self.__seekableStatusChanged()
 
+       def showAfterSeek(self):
+               if isinstance(self, InfoBarShowHide):
+                       self.doShow()
+
        def up(self):
                pass
 
@@ -1218,6 +1229,7 @@ class InfoBarPiP:
                        self.session.pipshown = False
                else:
                        self.session.pip = self.session.instantiateDialog(PictureInPicture)
+                       self.session.pip.show()
                        newservice = self.session.nav.getCurrentlyPlayingServiceReference()
                        if self.session.pip.playService(newservice):
                                self.session.pipshown = True
@@ -1800,13 +1812,23 @@ class InfoBarCueSheetSupport:
                if onlyreturn:
                        return None
 
+       def showAfterCuesheetOperation(self):
+               if isinstance(self, InfoBarShowHide):
+                       self.doShow()
+
        def addMark(self, point):
                insort(self.cut_list, point)
                self.uploadCuesheet()
+               self.showAfterCuesheetOperation()
 
        def removeMark(self, point):
                self.cut_list.remove(point)
                self.uploadCuesheet()
+               self.showAfterCuesheetOperation()
+
+       def showAfterCuesheetOperation(self):
+               if isinstance(self, InfoBarShowHide):
+                       self.doShow()
 
        def __getCuesheet(self):
                service = self.session.nav.getCurrentService()
@@ -1826,9 +1848,10 @@ class InfoBarCueSheetSupport:
                cue = self.__getCuesheet()
 
                if cue is None:
-                       print "upload failed, no cuesheet interface"
-                       return
-               self.cut_list = cue.getCutList()
+                       print "download failed, no cuesheet interface"
+                       self.cut_list = [ ]
+               else:
+                       self.cut_list = cue.getCutList()
 
 class InfoBarSummary(Screen):
        skin = """