X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/e75a3982be89898b54bf2b6bf91d36170d4c4409..98efaa152afc767093651fc0a2316d90a19f757a:/mytest.py diff --git a/mytest.py b/mytest.py index 206802e7..42f1e009 100644 --- a/mytest.py +++ b/mytest.py @@ -16,7 +16,28 @@ from Navigation import Navigation from skin import readSkin, applyAllAttributes from Components.config import configfile -from Screens.Wizard import listActiveWizards +from Tools.Directories import InitFallbackFiles +InitFallbackFiles() +eDVBDB.getInstance().reloadBouquets() + +try: + from twisted.internet import e2reactor + e2reactor.install() + + from twisted.internet import reactor + + def runReactor(): + reactor.run() +except: + def runReactor(): + runMainloop() + +# initialize autorun plugins and plugin menu entries +from Components.PluginComponent import plugins +plugins.getPluginList(runAutostartPlugins=True) +from Screens.Wizard import wizardManager +from Screens.StartWizard import * +from Screens.TutorialWizard import * from Tools.BoundFunction import boundFunction had = dict() @@ -74,8 +95,6 @@ class Session: if self.currentDialog.isTmp: self.currentDialog.doClose() - - del self.currentDialog.instance # dump(self.currentDialog) del self.currentDialog else: @@ -120,12 +139,21 @@ class Session: quitMainloop(5) print '-'*60 + if dlg is None: + return + # read skin data readSkin(dlg, None, dlg.skinName, self.desktop) # create GUI view of this dialog assert self.desktop != None - dlg.instance = eWindow(self.desktop) + + z = 0 + for (key, value) in dlg.skinAttributes: + if key == "zPosition": + z = int(value) + + dlg.instance = eWindow(self.desktop, z) applyAllAttributes(dlg.instance, self.desktop, dlg.skinAttributes) gui = GUIOutputDevice() gui.parent = dlg.instance @@ -177,7 +205,7 @@ def runScreenTest(): session.nav = Navigation() - screensToRun = listActiveWizards() + screensToRun = wizardManager.getWizards() screensToRun.append(Screens.InfoBar.InfoBar) def runNextScreen(session, screensToRun, *result): @@ -195,7 +223,7 @@ def runScreenTest(): CONNECT(keyPressedSignal(), session.keyEvent) - runMainloop() + runReactor() configfile.save() @@ -214,6 +242,12 @@ Components.InputDevice.InitInputDevices() import Components.AVSwitch Components.AVSwitch.InitAVSwitch() +import Components.RecordingConfig +Components.RecordingConfig.InitRecordingConfig() + +import Components.UsageConfig +Components.UsageConfig.InitUsageConfig() + import Components.Network Components.Network.InitNetwork() @@ -231,6 +265,7 @@ import Components.NimManager # first, setup a screen try: runScreenTest() + plugins.getPluginList(runAutoendPlugins=True) except: print 'EXCEPTION IN PYTHON STARTUP CODE:' print '-'*60