self.load(self.root)
self.l.setList(self.list)
+ def removeService(self, service):
+ for l in self.list[:]:
+ if l[0][0] == service:
+ self.list.remove(l)
+ self.l.setList(self.list)
+
def load(self, root):
# this lists our root service, then building a
# nice list
if result == False:
self.session.openWithCallback(self.close, MessageBox, _("Delete failed!"), MessageBox.TYPE_ERROR)
else:
- list = self.csel["list"]
- currentIndex = list.getCurrentIndex()
- list.moveDown()
- if list.getCurrentIndex() == currentIndex:
- currentIndex -= 1
- list.reload()
- list.moveToIndex(currentIndex)
+ list = self.csel["list"].removeService(self.service)
self.close()
class MovieSelection(Screen):