+from Tools import RedirectOutput
from enigma import *
from tools import *
from skin import readSkin, applyAllAttributes
from Components.config import configfile
-from Tools.Directories import InitFallbackFiles
+from Tools.Directories import InitFallbackFiles, resolveFilename, SCOPE_PLUGINS
InitFallbackFiles()
eDVBDB.getInstance().reloadBouquets()
try:
- from twisted.internet import e2reactor
+ import e2reactor
e2reactor.install()
from twisted.internet import reactor
def runReactor():
reactor.run()
-except:
+except ImportError:
+ print "twisted not available"
def runReactor():
runMainloop()
# initialize autorun plugins and plugin menu entries
from Components.PluginComponent import plugins
-plugins.getPluginList(runAutostartPlugins=True)
+plugins.readPluginList(resolveFilename(SCOPE_PLUGINS))
+
from Screens.Wizard import wizardManager
from Screens.StartWizard import *
from Screens.TutorialWizard import *
from Tools.BoundFunction import boundFunction
+from Plugins.Plugin import PluginDescriptor
had = dict()
# when execBegin opened a new dialog, don't bother showing the old one.
if c == self.currentDialog:
- c.instance.show()
+ c.show()
def execEnd(self):
self.currentDialog.execEnd()
- self.currentDialog.instance.hide()
+ self.currentDialog.hide()
def create(self, screen, arguments):
# creates an instance of 'screen' (which is a class)
if (eDVBVolumecontrol.getInstance().isMuted()):
self.volMute()
eDVBVolumecontrol.getInstance().volumeUp()
- self.volumeDialog.instance.show()
+ self.volumeDialog.show()
self.volumeDialog.setValue(eDVBVolumecontrol.getInstance().getVolume())
self.volSave()
self.hideVolTimer.start(3000, True)
if (eDVBVolumecontrol.getInstance().isMuted()):
self.volMute()
eDVBVolumecontrol.getInstance().volumeDown()
- self.volumeDialog.instance.show()
+ self.volumeDialog.show()
self.volumeDialog.setValue(eDVBVolumecontrol.getInstance().getVolume())
self.volSave()
self.hideVolTimer.start(3000, True)
def volHide(self):
- self.volumeDialog.instance.hide()
+ self.volumeDialog.hide()
def volMute(self):
eDVBVolumecontrol.getInstance().volumeToggleMute()
self.volumeDialog.setValue(eDVBVolumecontrol.getInstance().getVolume())
if (eDVBVolumecontrol.getInstance().isMuted()):
- self.muteDialog.instance.show()
+ self.muteDialog.show()
else:
- self.muteDialog.instance.hide()
+ self.muteDialog.hide()
def runScreenTest():
session = Session()
session.nav = Navigation()
- screensToRun = wizardManager.getWizards()
+ screensToRun = [ ]
+
+ for p in plugins.getPlugins(PluginDescriptor.WHERE_WIZARD):
+ screensToRun.append(p.__call__)
+
+ screensToRun += wizardManager.getWizards()
+
screensToRun.append(Screens.InfoBar.InfoBar)
def runNextScreen(session, screensToRun, *result):
if result:
- quitMainloop(result)
+ quitMainloop(*result)
+ return
screen = screensToRun[0]
# first, setup a screen
try:
runScreenTest()
- plugins.getPluginList(runAutoendPlugins=True)
+ plugins.shutdown()
except:
print 'EXCEPTION IN PYTHON STARTUP CODE:'
print '-'*60