fix instant record for broken eit events. if something else is broken: this is tmbinc...
[enigma2.git] / mytest.py
index 573a00728f02e67f0eeee303d59fa2f2648c7847..42f1e0091f947ad5cd781e103cbf2e8805cd95b3 100644 (file)
--- a/mytest.py
+++ b/mytest.py
@@ -16,17 +16,29 @@ from Navigation import Navigation
 from skin import readSkin, applyAllAttributes
 
 from Components.config import configfile
-from Screens.Wizard import wizardManager
-from Screens.StartWizard import *
-from Screens.TutorialWizard import *
-from Tools.BoundFunction import boundFunction
 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()
+plugins.getPluginList(runAutostartPlugins=True)
+from Screens.Wizard import wizardManager
+from Screens.StartWizard import *
+from Screens.TutorialWizard import *
+from Tools.BoundFunction import boundFunction
 
 had = dict()
 
@@ -135,7 +147,13 @@ class Session:
 
                # 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
@@ -205,7 +223,7 @@ def runScreenTest():
 
        CONNECT(keyPressedSignal(), session.keyEvent)
        
-       runMainloop()
+       runReactor()
        
        configfile.save()
        
@@ -227,6 +245,9 @@ Components.AVSwitch.InitAVSwitch()
 import Components.RecordingConfig
 Components.RecordingConfig.InitRecordingConfig()
 
+import Components.UsageConfig
+Components.UsageConfig.InitUsageConfig()
+
 import Components.Network
 Components.Network.InitNetwork()
 
@@ -244,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