FactoryTest : Remove overlap func..
authorChang.H.S <jhs@dev3>
Mon, 26 Sep 2011 07:42:33 +0000 (16:42 +0900)
committerChang.H.S <jhs@dev3>
Mon, 26 Sep 2011 07:42:33 +0000 (16:42 +0900)
lib/python/Plugins/SystemPlugins/FactoryTest/plugin.py

index ea3947a..462b328 100755 (executable)
@@ -23,20 +23,7 @@ from Components.NimManager import nimmanager
 from enigma import eDVBCI_UI,eDVBCIInterfaces
 from Tools.Directories import resolveFilename, SCOPE_SYSETC
 
-class TestResultList(HTMLComponent, GUIComponent):
-       def __init__(self, list, enableWrapAround=False, content=eListboxPythonStringContent):
-               GUIComponent.__init__(self)
-               self.list = list
-               self.l = content()
-               self.l.setList(self.list)
-               self.onSelectionChanged = [ ]
-               self.enableWrapAround = enableWrapAround
-
-       def getCurrent(self):
-               return self.l.getCurrentSelection()
-
-       GUI_WIDGET = eListbox
-
+class TestResultList(MenuList):
        def postWidgetCreate(self, instance):
                self.instance.setSelectionEnable(0)
                instance.setContent(self.l)
@@ -44,52 +31,10 @@ class TestResultList(HTMLComponent, GUIComponent):
                if self.enableWrapAround:
                        self.instance.setWrapAround(True)
 
-       def preWidgetRemove(self, instance):
-               instance.setContent(None)
-               instance.selectionChanged.get().remove(self.selectionChanged)
-
-       def selectionChanged(self):
-               for f in self.onSelectionChanged:
-                       f()
-
-       def getSelectionIndex(self):
-               return self.l.getCurrentSelectionIndex()
-
-       def getSelectedIndex(self):
-               return self.l.getCurrentSelectionIndex()
-
-       def setList(self, list):
-               self.list = list
-               self.l.setList(self.list)
-
        def updateList(self, list):
                self.list = list
                self.l.setList(self.list)
 
-       def moveToIndex(self, idx):
-               if self.instance is not None:
-                       self.instance.moveSelectionTo(idx)
-
-       def pageUp(self):
-               if self.instance is not None:
-                       self.instance.moveSelection(self.instance.pageUp)
-
-       def pageDown(self):
-               if self.instance is not None:
-                       self.instance.moveSelection(self.instance.pageDown)
-
-       def up(self):
-               if self.instance is not None:
-                       self.instance.moveSelection(self.instance.moveUp)
-
-       def down(self):
-               if self.instance is not None:
-                       self.instance.moveSelection(self.instance.moveDown)
-
-       def selectionEnabled(self, enabled):
-               if self.instance is not None:
-                       self.instance.setSelectionEnable(enabled)
-
 class FactoryTest(Screen):
        skin = """
                <screen position="120,125" size="440,400" title="Test Menu" >