X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/3a9a9d2a3eb9cb382b1ccaa978c532d2423dfe73..3087ea89b68dd764aaf363ab5ad2cbf5d27d1429:/lib/python/Screens/Menu.py diff --git a/lib/python/Screens/Menu.py b/lib/python/Screens/Menu.py index da07be16..3cc45923 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 @@ -23,7 +24,6 @@ from Tools import XMLTools # self.setModeTV() # self.setModeRadio() # self.setModeFile() -# self.openDialog(ScartLoopThrough) # @@ -62,9 +62,9 @@ menuupdater = MenuUpdater() class MenuSummary(Screen): skin = """ - - - + + + WithSeconds """ @@ -89,6 +89,9 @@ class MenuSummary(Screen): self["MenuEntry"].setText(self.parent["menu"].getCurrent()[0]) class Menu(Screen): + + ALLOW_SUSPEND = True + def okbuttonClick(self): print "okbuttonClick" selection = self["menu"].getCurrent() @@ -106,7 +109,7 @@ class Menu(Screen): # FIXME. somehow if arg[0] != "": exec "from " + arg[0] + " import *" - + self.openDialog(*eval(arg[1])) def nothing(self): #dummy @@ -180,9 +183,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 @@ -195,13 +197,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)