From: Felix Domke Date: Sun, 5 Mar 2006 22:38:47 +0000 (+0000) Subject: add WHERE_SESSIONSTART X-Git-Tag: 2.6.0~3865 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/e896fc8b8860ec9fc0e1f013d6405c454bfa88c8 add WHERE_SESSIONSTART --- diff --git a/lib/python/Plugins/Plugin.py b/lib/python/Plugins/Plugin.py index 2c8d9296..71b665b1 100644 --- a/lib/python/Plugins/Plugin.py +++ b/lib/python/Plugins/Plugin.py @@ -28,6 +28,10 @@ class PluginDescriptor: # start as wizard. In that case, fnc must be a screen class! WHERE_WIZARD = 6 + # like autostart, but for a session. currently, only session starts are + # delivered, and only on pre-loaded plugins + WHERE_SESSIONSTART = 7 + def __init__(self, name = "Plugin", where = [ ], description = "", icon = None, fnc = None): self.name = name if type(where) is list: diff --git a/mytest.py b/mytest.py index 680f198d..448076c6 100644 --- a/mytest.py +++ b/mytest.py @@ -94,6 +94,9 @@ class Session: self.dialog_stack = [ ] self.summary_stack = [ ] self.summary = None + + for p in plugins.getPlugins(PluginDescriptor.WHERE_SESSIONSTART): + p(reason=0, session=self) def processDelay(self): self.execEnd() @@ -303,9 +306,9 @@ class VolumeControl: self.muteDialog.hide() def runScreenTest(): - session = Session(desktop = getDesktop(0), summary_desktop = getDesktop(1), navigation = Navigation()) - plugins.readPluginList(resolveFilename(SCOPE_PLUGINS)) + + session = Session(desktop = getDesktop(0), summary_desktop = getDesktop(1), navigation = Navigation()) screensToRun = [ ]