diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2006-10-10 02:00:12 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2006-10-10 02:00:12 +0000 |
| commit | 6ac5293d96c9fcd2961d3a71c635c485cf254a1d (patch) | |
| tree | 2989c57a0670073a5c5fd338e060bf6ec29e573e /lib/python/Screens | |
| parent | 9c23db1bfd7ff0d851e9557124deb69aa9789105 (diff) | |
| download | enigma2-6ac5293d96c9fcd2961d3a71c635c485cf254a1d.tar.gz enigma2-6ac5293d96c9fcd2961d3a71c635c485cf254a1d.zip | |
add possibility to have menu entries from a plugin
Diffstat (limited to 'lib/python/Screens')
| -rw-r--r-- | lib/python/Screens/Menu.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/python/Screens/Menu.py b/lib/python/Screens/Menu.py index 6ef4cc4e..d6ec9015 100644 --- a/lib/python/Screens/Menu.py +++ b/lib/python/Screens/Menu.py @@ -7,6 +7,7 @@ from Components.Label import Label from Components.ProgressBar import ProgressBar from Components.config import configfile from Components.Sources.Clock import Clock +from Components.PluginComponent import plugins from Tools.Directories import resolveFilename, SCOPE_SKIN @@ -109,7 +110,7 @@ class Menu(Screen): # FIXME. somehow if arg[0] != "": exec "from " + arg[0] + " import *" - + self.openDialog(*eval(arg[1])) def nothing(self): #dummy @@ -183,9 +184,8 @@ class Menu(Screen): Screen.__init__(self, session) list = [] - menuID = "" - - menuID = -1 + + menuID = None for x in childNode: #walk through the actual nodelist if x.nodeType != xml.dom.minidom.Element.nodeType: continue @@ -198,13 +198,19 @@ class Menu(Screen): elif x.tagName == "id": menuID = x.getAttribute("val") count = 0 - if menuID != -1: + + if menuID is not None: + # menuupdater? if menuupdater.updatedMenuAvailable(menuID): for x in menuupdater.getUpdatedMenu(menuID): if x[1] == count: list.append((x[0], boundFunction(self.runScreen, (x[2], x[3] + ", ")))) count += 1 + if menuID is not None: + # plugins + for l in plugins.getPluginsForMenu(menuID): + list.append((l[0], boundFunction(l[1], self.session))) self["menu"] = MenuList(list) |
