allow standby only in InfoBar, MoviePlayer, Menus, Setup and Radiomode
authorFelix Domke <tmbinc@elitedvb.net>
Sun, 30 Jul 2006 20:20:34 +0000 (20:20 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Sun, 30 Jul 2006 20:20:34 +0000 (20:20 +0000)
lib/python/Screens/ChannelSelection.py
lib/python/Screens/InfoBar.py
lib/python/Screens/Menu.py
lib/python/Screens/Screen.py
lib/python/Screens/Setup.py
mytest.py

index 90c12a5..6239b00 100644 (file)
@@ -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)
index 471b1ab..0a297fb 100644 (file)
@@ -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)
index da07be1..1390b51 100644 (file)
@@ -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()
index 0727f78..b581e62 100644 (file)
@@ -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__
index 0d4764a..746c26d 100644 (file)
@@ -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)
 
index aa63567..8ea13e0 100644 (file)
--- 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