1 from Screens.MessageBox import MessageBox
3 class ServiceStopScreen:
8 print "[ServiceStopScreen] ERROR: no self.session set"
11 self.onClose.append(self.__onClose)
13 def pipAvailable(self):
14 # pip isn't available in every state of e2
22 def stopService(self):
23 self.oldref = self.session.nav.getCurrentlyPlayingServiceReference()
24 self.session.nav.stopService()
25 if self.pipAvailable():
26 if self.session.pipshown: # try to disable pip
27 self.session.pipshown = False
31 self.session.nav.playService(self.oldref)
33 def restoreService(self, msg = _("Zap back to previously tuned service?")):
35 self.session.openWithCallback(self.restartPrevService, MessageBox, msg, MessageBox.TYPE_YESNO)
37 self.restartPrevService(False)
39 def restartPrevService(self, yesno):