From: Stefan Pluecken Date: Wed, 11 Oct 2006 00:50:00 +0000 (+0000) Subject: sort list properly in ParentalControlSetup X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=commitdiff_plain;h=b47f1ee99b425af13063d2680da7aa7be4d33d27 sort list properly in ParentalControlSetup --- diff --git a/lib/python/Screens/ParentalControlSetup.py b/lib/python/Screens/ParentalControlSetup.py index 944fc6a..d17ee73 100644 --- a/lib/python/Screens/ParentalControlSetup.py +++ b/lib/python/Screens/ParentalControlSetup.py @@ -185,16 +185,16 @@ class ParentalControlEditor(Screen): def chooseLetter(self): print "choose letter" - list = [] + mylist = [] for x in self.servicesList.keys(): if x == '&': x = ("special characters", x) else: x = (x, x) - list.append(x) - print "sorted list:", sorted(list, key=operator.itemgetter(1)) + mylist.append(x) + mylist.sort(key=operator.itemgetter(1)) print self.servicesList.keys() - self.session.openWithCallback(self.letterChosen, ChoiceBox, title=_("Show services beginning with"), list=list) + self.session.openWithCallback(self.letterChosen, ChoiceBox, title=_("Show services beginning with"), list=mylist) def letterChosen(self, result): if result is not None: