From 02ccc66eb625545cedf7222b0467c077f43c4150 Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Tue, 29 Nov 2005 21:44:37 +0000 Subject: [PATCH 1/1] ServiceList: allow setMode before GUIcreate --- lib/python/Components/ServiceList.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/python/Components/ServiceList.py b/lib/python/Components/ServiceList.py index d39e7427..89b40ed2 100644 --- a/lib/python/Components/ServiceList.py +++ b/lib/python/Components/ServiceList.py @@ -12,6 +12,8 @@ class ServiceList(HTMLComponent, GUIComponent): GUIComponent.__init__(self) self.l = eListboxServiceContent() self.root = None + + self.mode = self.MODE_NORMAL def setCurrent(self, ref): self.l.setCurrent(ref) @@ -30,6 +32,7 @@ class ServiceList(HTMLComponent, GUIComponent): def GUIcreate(self, parent): self.instance = eListbox(parent) self.instance.setContent(self.l) + self.setMode(self.mode) def GUIdelete(self): self.instance = None @@ -86,6 +89,13 @@ class ServiceList(HTMLComponent, GUIComponent): self.l.setCurrentMarked(state) def setMode(self, mode): + self.mode = mode + + try: + self.instance + except: + return + if mode == self.MODE_NORMAL: self.instance.setItemHeight(28) self.l.setVisualMode(eListboxServiceContent.visModeSimple) -- 2.30.2