X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fpython%2FComponents%2FHelpMenuList.py;h=66139dfbcafcfefa207007396b013fdf7c9ec80f;hp=2a7bd9958de374a4d337cc7b8c49ce98b8b330b5;hb=ba5fcab217438b995c1f903e0294b71d1411668b;hpb=408672189d8e0714aaa52e91cd7e3906b78f4044 diff --git a/lib/python/Components/HelpMenuList.py b/lib/python/Components/HelpMenuList.py index 2a7bd99..66139df 100755 --- a/lib/python/Components/HelpMenuList.py +++ b/lib/python/Components/HelpMenuList.py @@ -7,7 +7,7 @@ from Tools.KeyBindings import queryKeyBinding, getKeyDescription # [ ( actionmap, context, [(action, help), (action, help), ...] ), (actionmap, ... ), ... ] class HelpMenuList(GUIComponent): - def __init__(self, list, callback): + def __init__(self, helplist, callback): GUIComponent.__init__(self) self.onSelChanged = [ ] self.l = eListboxPythonMultiContent() @@ -15,10 +15,8 @@ class HelpMenuList(GUIComponent): self.extendedHelp = False l = [ ] - for (actionmap, context, actions) in list: + for (actionmap, context, actions) in helplist: for (action, help) in actions: - entry = [ ] - buttons = queryKeyBinding(context, action) # do not display entries which are not accessible from keys @@ -36,13 +34,15 @@ class HelpMenuList(GUIComponent): if flags & 8: # for long keypresses, prepend l_ into the key name. name = (name[0], "long") - entry.append( (actionmap, context, action, name ) ) - + entry = [ (actionmap, context, action, name ) ] + if isinstance(help, list): self.extendedHelp = True print "extendedHelpEntry found" - entry.append( (eListboxPythonMultiContent.TYPE_TEXT, 0, 0, 400, 26, 0, 0, help[0]) ) - entry.append( (eListboxPythonMultiContent.TYPE_TEXT, 0, 28, 400, 20, 1, 0, help[1]) ) + entry.extend(( + (eListboxPythonMultiContent.TYPE_TEXT, 0, 0, 400, 26, 0, 0, help[0]), + (eListboxPythonMultiContent.TYPE_TEXT, 0, 28, 400, 20, 1, 0, help[1]) + )) else: entry.append( (eListboxPythonMultiContent.TYPE_TEXT, 0, 0, 400, 28, 0, 0, help) )