pre select currently running subservice in subservicelist
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Sat, 18 Mar 2006 15:18:34 +0000 (15:18 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Sat, 18 Mar 2006 15:18:34 +0000 (15:18 +0000)
lib/python/Components/MenuList.py
lib/python/Screens/SubserviceSelection.py

index 4e032d43b963b35c66650b70c5320a7fddaf9d8e..b12cb2365d6ba4c85fc31bcea7d3b21b47c0a6a7 100644 (file)
@@ -29,4 +29,7 @@ class MenuList(HTMLComponent, GUIComponent):
 
        def setList(self, list):
                self.list = list
-               self.l.setList(self.list)
\ No newline at end of file
+               self.l.setList(self.list)
+
+       def moveToIndex(self, idx):
+               self.instance.moveSelectionTo(idx)
index 587105689ad8cc7f0cf183badf5948fcaa822873..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,39 +0,0 @@
-from Screen import Screen
-from Components.ActionMap import ActionMap
-from Components.MenuList import MenuList
-from Components.Label import Label
-from enigma import eServiceReferencePtr, eServiceReference, iSubserviceListPtr, eServiceEventPtrPtr
-
-class SubserviceSelection(Screen):
-       def KeyOk(self):
-               selection = self["subservices"].getCurrent()
-               self.close(selection[1])
-       def Cancel(self):
-               self.close(None)
-       def __init__(self, session, subservices, parent=None):
-               Screen.__init__(self, session)
-
-               self["actions"] = ActionMap(["OkCancelActions"], 
-                       {
-                               "cancel": self.Cancel,
-                               "ok": self.KeyOk,
-                       })
-
-               self.subservices = subservices
-
-               print "subservices", subservices
-               tlist = []
-               if isinstance(subservices, iSubserviceListPtr):
-                       n = subservices.getNumberOfSubservices()
-                       for x in range(n):
-                               i = subservices.getSubservice(x)
-                               tlist.append((i.getName(), i))
-               elif isinstance(subservices, eServiceEventPtrPtr):
-                       n = subservices.getNumOfLinkageServices()
-                       for x in range(n):
-                               i = subservices.getLinkageService(parent, x)
-                               tlist.append((i.getName(), i))
-               else:
-                       print "unknown type of subservices"
-
-               self["subservices"] = MenuList(tlist)