X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/5e74dc98aad36025621d14b36faeb0c649bf8b9b..5f33698a4493178368088529911aa48201e8bca2:/mytest.py diff --git a/mytest.py b/mytest.py index 36a9382a..26edd6b9 100644 --- a/mytest.py +++ b/mytest.py @@ -23,11 +23,13 @@ from Navigation import Navigation from skin import readSkin, applyAllAttributes -from Components.config import configfile -from Tools.Directories import InitFallbackFiles, resolveFilename, SCOPE_PLUGINS +from Tools.Directories import InitFallbackFiles, resolveFilename, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE +from Components.config import config, ConfigText, configfile, ConfigSubsection, ConfigInteger InitFallbackFiles() eDVBDB.getInstance().reloadBouquets() +config.misc.radiopic = ConfigText(default = resolveFilename(SCOPE_SKIN_IMAGE)+"radio.mvi") + try: import e2reactor e2reactor.install() @@ -191,6 +193,10 @@ class Session: def instantiateDialog(self, screen, *arguments, **kwargs): return self.doInstantiateDialog(screen, arguments, kwargs, self.desktop) + def deleteDialog(self, screen): + screen.hide() + screen.doClose() + def instantiateSummaryDialog(self, screen, *arguments, **kwargs): return self.doInstantiateDialog(screen, arguments, kwargs, self.summary_desktop) @@ -268,9 +274,6 @@ class Session: self.execBegin() return dlg - def keyEvent(self, code): - print "code " + str(code) - def close(self, screen, *retval): if not self.in_exec: print "close after exec!" @@ -305,7 +308,6 @@ class Session: from Screens.Volume import Volume from Screens.Mute import Mute from GlobalActions import globalActionMap -from Components.config import ConfigSubsection, configSequence, configElement, configsequencearg #TODO .. move this to a own .py file class VolumeControl: @@ -318,7 +320,7 @@ class VolumeControl: globalActionMap.actions["volumeMute"]=self.volMute config.audio = ConfigSubsection() - config.audio.volume = configElement("config.audio.volume", configSequence, [100], configsequencearg.get("INTEGER", (0, 100))) + config.audio.volume = ConfigInteger(default = 100, limits = (0, 100)) self.volumeDialog = session.instantiateDialog(Volume) self.muteDialog = session.instantiateDialog(Mute) @@ -326,7 +328,8 @@ class VolumeControl: self.hideVolTimer = eTimer() self.hideVolTimer.timeout.get().append(self.volHide) - vol = config.audio.volume.value[0] + vol = config.audio.volume.value + print "volume is", vol self.volumeDialog.setValue(vol) eDVBVolumecontrol.getInstance().setVolume(vol, vol) @@ -399,7 +402,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 @@ -435,8 +439,6 @@ def runScreenTest(): runNextScreen(session, screensToRun) - CONNECT(keyPressedSignal(), session.keyEvent) - vol = VolumeControl(session) power = PowerKey(session) @@ -453,6 +455,7 @@ def runScreenTest(): else: setFPWakeuptime(nextRecordingTime - (300)) + session.nav.stopService() session.nav.shutdown() return 0 @@ -488,6 +491,9 @@ Components.RFmod.InitRFmod() import Components.NimManager +import Screens.Ci +Screens.Ci.InitCiConfig() + # first, setup a screen try: runScreenTest()