X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fpython%2FComponents%2FConfigList.py;h=ffbc69af254c344f62cfd6882bc15bafd6743abc;hp=607858026d17d399ca7e2d9355bd5e07492f033a;hb=ca082734334ea28bc248e619223fbc02f9fc2705;hpb=383faf2da1a60442431dce44760a0392c5829dc8 diff --git a/lib/python/Components/ConfigList.py b/lib/python/Components/ConfigList.py index 6078580..ffbc69a 100755 --- a/lib/python/Components/ConfigList.py +++ b/lib/python/Components/ConfigList.py @@ -61,12 +61,13 @@ class ConfigList(HTMLComponent, GUIComponent, object): GUI_WIDGET = eListbox def selectionChanged(self): - if self.current: + if isinstance(self.current,tuple) and len(self.current) == 2: self.current[1].onDeselect(self.session) self.current = self.getCurrent() - if self.current: + if isinstance(self.current,tuple) and len(self.current) == 2: self.current[1].onSelect(self.session) - + else: + return for x in self.onSelectionChanged: x() @@ -75,11 +76,11 @@ class ConfigList(HTMLComponent, GUIComponent, object): instance.setContent(self.l) def preWidgetRemove(self, instance): - if self.current: + if isinstance(self.current,tuple) and len(self.current) == 2: self.current[1].onDeselect(self.session) instance.selectionChanged.get().remove(self.selectionChanged) instance.setContent(None) - + def setList(self, l): self.timer.stop() self.__list = l @@ -146,15 +147,20 @@ class ConfigListScreen: self["config"].onSelectionChanged.append(self.handleInputHelpers) def handleInputHelpers(self): - if isinstance(self["config"].getCurrent()[1], ConfigText) or isinstance(self["config"].getCurrent()[1], ConfigPassword): - if self.has_key("VKeyIcon"): - self["VirtualKB"].setEnabled(True) - self["VKeyIcon"].boolean = True - if self.has_key("HelpWindow"): - if self["config"].getCurrent()[1].help_window.instance is not None: - helpwindowpos = self["HelpWindow"].getPosition() - from enigma import ePoint - self["config"].getCurrent()[1].help_window.instance.move(ePoint(helpwindowpos[0],helpwindowpos[1])) + if self["config"].getCurrent() is not None: + if isinstance(self["config"].getCurrent()[1], ConfigText) or isinstance(self["config"].getCurrent()[1], ConfigPassword): + if self.has_key("VKeyIcon"): + self["VirtualKB"].setEnabled(True) + self["VKeyIcon"].boolean = True + if self.has_key("HelpWindow"): + if self["config"].getCurrent()[1].help_window.instance is not None: + helpwindowpos = self["HelpWindow"].getPosition() + from enigma import ePoint + self["config"].getCurrent()[1].help_window.instance.move(ePoint(helpwindowpos[0],helpwindowpos[1])) + else: + if self.has_key("VKeyIcon"): + self["VirtualKB"].setEnabled(False) + self["VKeyIcon"].boolean = False else: if self.has_key("VKeyIcon"): self["VirtualKB"].setEnabled(False)