X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/b0bdeff2a2042c42b6370b166de0474c3431570b..0cb206d2c07cb9e4130e13234e3fd59b127421a8:/lib/python/Screens/HelpMenu.py diff --git a/lib/python/Screens/HelpMenu.py b/lib/python/Screens/HelpMenu.py index abef38db..305e3555 100644 --- a/lib/python/Screens/HelpMenu.py +++ b/lib/python/Screens/HelpMenu.py @@ -25,17 +25,18 @@ class HelpMenu(Screen, Rc): def SelectionChanged(self): self.clearSelectedKeys() selection = self["list"].getCurrent() - selection = selection[3] + if selection: + selection = selection[3] #arrow = self["arrowup"] print "selection:", selection - if selection and len(selection) > 1 and selection[1] == "SHIFT": - self.selectKey("SHIFT") - - if selection and len(selection) > 1 and selection[1] == "long": - self["long_key"].setText(_("Long Keypress")) - else: - self["long_key"].setText("") + longText = "" + if selection and len(selection) > 1: + if selection[1] == "SHIFT": + self.selectKey("SHIFT") + elif selection[1] == "long": + longText = _("Long Keypress") + self["long_key"].setText(longText) self.selectKey(selection[0]) #if selection is None: @@ -55,6 +56,6 @@ class HelpableScreen: self.session.openWithCallback(self.callHelpAction, HelpMenu, self.helpList) def callHelpAction(self, *args): - if len(args): + if args: (actionmap, context, action) = args actionmap.action(context, action)