from Tools.Notifications import AddNotificationWithCallback
from Screens.InfoBarGenerics import InfoBarShowHide, \
- InfoBarPowerKey, InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, \
+ InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, \
InfoBarEPG, InfoBarEvent, InfoBarServiceName, InfoBarSeek, InfoBarInstantRecord, \
InfoBarAudioSelection, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, \
InfoBarSubserviceSelection, InfoBarTuner, InfoBarShowMovies, InfoBarTimeshift, \
import time
-class InfoBar(InfoBarShowHide, InfoBarPowerKey,
+class InfoBar(InfoBarShowHide,
InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, InfoBarEPG,
InfoBarEvent, InfoBarServiceName, InfoBarInstantRecord, InfoBarAudioSelection,
HelpableScreen, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish,
})
for x in HelpableScreen, \
- InfoBarShowHide, InfoBarPowerKey, \
+ InfoBarShowHide, \
InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, InfoBarEPG, \
InfoBarEvent, InfoBarServiceName, InfoBarInstantRecord, InfoBarAudioSelection, \
InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarSubserviceSelection, \
if service is not None:
self.session.open(MoviePlayer, service)
-class MoviePlayer(InfoBarShowHide, InfoBarPowerKey, \
+class MoviePlayer(InfoBarShowHide, \
InfoBarMenu, \
InfoBarServiceName, InfoBarSeek, InfoBarShowMovies, InfoBarAudioSelection, HelpableScreen, InfoBarNotifications,
InfoBarServiceNotifications, InfoBarPVRState, InfoBarCueSheetSupport, InfoBarSimpleEventView,
"leavePlayer": (self.leavePlayer, _("leave movie player..."))
})
- for x in HelpableScreen, InfoBarShowHide, InfoBarPowerKey, InfoBarMenu, \
+ for x in HelpableScreen, InfoBarShowHide, InfoBarMenu, \
InfoBarServiceName, InfoBarSeek, InfoBarShowMovies, \
InfoBarAudioSelection, InfoBarNotifications, InfoBarSimpleEventView, \
InfoBarServiceNotifications, InfoBarPVRState, InfoBarCueSheetSupport, \
from Screens.InputBox import InputBox
from Screens.MessageBox import MessageBox
from Screens.MinuteInput import MinuteInput
-from Screens.Standby import Standby
from ServiceReference import ServiceReference
from Tools import Notifications
self.Timer.timeout.get().append(self.keyOK)
self.Timer.start(3000, True)
-class InfoBarPowerKey:
- """ PowerKey stuff - handles the powerkey press and powerkey release actions"""
-
- def __init__(self):
- self.powerKeyTimer = eTimer()
- self.powerKeyTimer.timeout.get().append(self.powertimer)
- self["PowerKeyActions"] = HelpableActionMap(self, "PowerKeyActions",
- {
- "powerdown": self.powerdown,
- "powerup": self.powerup,
- "discreteStandby": (self.standby, "Go standby"),
- "discretePowerOff": (self.quit, "Go to deep standby"),
- })
-
- def powertimer(self):
- print "PowerOff - Now!"
- self.quit()
-
- def powerdown(self):
- self.standbyblocked = 0
- self.powerKeyTimer.start(3000, True)
-
- def powerup(self):
- self.powerKeyTimer.stop()
- if self.standbyblocked == 0:
- self.standbyblocked = 1
- self.standby()
-
- def standby(self):
- self.session.open(Standby, self)
-
- def quit(self):
- # halt
- quitMainloop(1)
-
class InfoBarNumberZap:
""" Handles an initial number for NumberZapping """
def __init__(self):
else:
self.muteDialog.hide()
+from Screens.Standby import Standby
+
+class PowerKey:
+ """ PowerKey stuff - handles the powerkey press and powerkey release actions"""
+
+ def __init__(self, session):
+ self.session = session
+ self.powerKeyTimer = eTimer()
+ self.powerKeyTimer.timeout.get().append(self.powertimer)
+ globalActionMap.actions["powerdown"]=self.powerdown
+ globalActionMap.actions["powerup"]=self.powerup
+
+# self["PowerKeyActions"] = HelpableActionMap(self, "PowerKeyActions",
+ #{
+ #"powerdown": self.powerdown,
+ #"powerup": self.powerup,
+ #"discreteStandby": (self.standby, "Go standby"),
+ #"discretePowerOff": (self.quit, "Go to deep standby"),
+ #})
+
+ def powertimer(self):
+ print "PowerOff - Now!"
+ self.quit()
+
+ def powerdown(self):
+ self.standbyblocked = 0
+ self.powerKeyTimer.start(3000, True)
+
+ def powerup(self):
+ self.powerKeyTimer.stop()
+ if self.standbyblocked == 0:
+ self.standbyblocked = 1
+ self.standby()
+
+ def standby(self):
+ self.session.open(Standby, self)
+
+ def quit(self):
+ # halt
+ quitMainloop(1)
+
def runScreenTest():
plugins.readPluginList(resolveFilename(SCOPE_PLUGINS))
CONNECT(keyPressedSignal(), session.keyEvent)
vol = VolumeControl(session)
+ power = PowerKey(session)
runReactor()