From 574f425cc1ebece0aa5f09fb77a8cb7ad0310a1f Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 24 Feb 2009 20:56:21 +0100 Subject: small optimizations and cleanups by Moritz Venn --- lib/python/Screens/HelpMenu.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/python/Screens/HelpMenu.py') diff --git a/lib/python/Screens/HelpMenu.py b/lib/python/Screens/HelpMenu.py index abef38db..74882a35 100644 --- a/lib/python/Screens/HelpMenu.py +++ b/lib/python/Screens/HelpMenu.py @@ -29,13 +29,13 @@ class HelpMenu(Screen, Rc): #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 +55,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) -- cgit v1.2.3