From: Felix Domke Date: Sun, 30 Jul 2006 20:20:34 +0000 (+0000) Subject: allow standby only in InfoBar, MoviePlayer, Menus, Setup and Radiomode X-Git-Tag: 2.6.0~3101 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/d0f2817f1832e912282c886454e4f8112da56966 allow standby only in InfoBar, MoviePlayer, Menus, Setup and Radiomode --- diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py index 90c12a5d..6239b001 100644 --- a/lib/python/Screens/ChannelSelection.py +++ b/lib/python/Screens/ChannelSelection.py @@ -1118,6 +1118,9 @@ class RadioInfoBar(Screen, InfoBarEvent, InfoBarServiceName, InfoBarInstantRecor self["CurrentTime"] = Clock() class ChannelSelectionRadio(ChannelSelectionBase, ChannelSelectionEdit, ChannelSelectionEPG): + + ALLOW_SUSPEND = True + def __init__(self, session): ChannelSelectionBase.__init__(self, session) ChannelSelectionEdit.__init__(self) diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py index 471b1abe..0a297fbf 100644 --- a/lib/python/Screens/InfoBar.py +++ b/lib/python/Screens/InfoBar.py @@ -34,6 +34,8 @@ class InfoBar(InfoBarShowHide, InfoBarSubserviceSelection, InfoBarTuner, InfoBarTimeshift, InfoBarSeek, InfoBarSummarySupport, InfoBarTimeshiftState, InfoBarTeletextPlugin, InfoBarExtensions, InfoBarSubtitleSupport, Screen): + + ALLOW_SUSPEND = True def __init__(self, session): Screen.__init__(self, session) @@ -84,6 +86,7 @@ class MoviePlayer(InfoBarShowHide, \ InfoBarSummarySupport, InfoBarTeletextPlugin, InfoBarSubtitleSupport, Screen): ENABLE_RESUME_SUPPORT = True + ALLOW_SUSPEND = True def __init__(self, session, service): Screen.__init__(self, session) diff --git a/lib/python/Screens/Menu.py b/lib/python/Screens/Menu.py index da07be16..1390b51a 100644 --- a/lib/python/Screens/Menu.py +++ b/lib/python/Screens/Menu.py @@ -89,6 +89,9 @@ class MenuSummary(Screen): self["MenuEntry"].setText(self.parent["menu"].getCurrent()[0]) class Menu(Screen): + + ALLOW_SUSPEND = True + def okbuttonClick(self): print "okbuttonClick" selection = self["menu"].getCurrent() diff --git a/lib/python/Screens/Screen.py b/lib/python/Screens/Screen.py index 0727f78b..b581e62b 100644 --- a/lib/python/Screens/Screen.py +++ b/lib/python/Screens/Screen.py @@ -5,7 +5,8 @@ from Components.Sources.Source import Source import sys class Screen(dict, HTMLSkin, GUISkin): - """ bla """ + + ALLOW_SUSPEND = False def __init__(self, session): self.skinName = self.__class__.__name__ diff --git a/lib/python/Screens/Setup.py b/lib/python/Screens/Setup.py index 0d4764ac..746c26d3 100644 --- a/lib/python/Screens/Setup.py +++ b/lib/python/Screens/Setup.py @@ -54,6 +54,9 @@ class SetupSummary(Screen): self["SetupValue"].text = self.parent.getCurrentValue() class Setup(Screen): + + ALLOW_SUSPEND = True + def __init__(self, session, setup): Screen.__init__(self, session) diff --git a/mytest.py b/mytest.py index aa63567a..8ea13e0a 100644 --- a/mytest.py +++ b/mytest.py @@ -397,7 +397,8 @@ class PowerKey: self.standby() def standby(self): - self.session.open(Standby, self) + if self.session.current_dialog and self.session.current_dialog.ALLOW_SUSPEND: + self.session.open(Standby, self) def quit(self): # halt