From 6047456faa97f18ca8b6ea7bfbb2ac1856765580 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Mon, 14 Nov 2005 03:02:01 +0000 Subject: [PATCH] fix movemode, do not use listboxcontent private variables --- lib/python/Components/ServiceList.py | 6 ------ lib/python/Screens/ChannelSelection.py | 4 ++-- lib/service/listboxservice.h | 5 +++-- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/python/Components/ServiceList.py b/lib/python/Components/ServiceList.py index 76e1c822..efe928dd 100644 --- a/lib/python/Components/ServiceList.py +++ b/lib/python/Components/ServiceList.py @@ -52,12 +52,6 @@ class ServiceList(HTMLComponent, GUIComponent): self.l.setRoot(root) self.l.sort() - def cursorGet(self): - return self.l.cursorGet() - - def cursorSet(self, val): - self.l.cursorSet(val) - # stuff for multiple marks (edit mode / later multiepg) def clearMarks(self): self.l.initMarked() diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py index 496131bd..fc412a84 100644 --- a/lib/python/Screens/ChannelSelection.py +++ b/lib/python/Screens/ChannelSelection.py @@ -126,10 +126,8 @@ class ChannelSelection(Screen): ref=l.getCurrent() if ref.valid() and self.mutableList is not None: self.mutableList.removeService(ref) - pos = l.cursorGet() self.mutableList.flushChanges() #FIXME dont flush on each single removed service self.setRoot(l.getRoot()) -# l.cursorSet(pos) #whats going wrong here???? def endMarkedEdit(self, abort): l = self["list"] @@ -208,6 +206,8 @@ class ChannelSelection(Screen): def toggleMoveMode(self): if self.movemode: + if self.entry_marked: + self.channelSelected() # unmark current entry self.movemode = False self.mutableList.flushChanges() # FIXME add check if changes was made else: diff --git a/lib/service/listboxservice.h b/lib/service/listboxservice.h index e65ffc8d..d64805c5 100644 --- a/lib/service/listboxservice.h +++ b/lib/service/listboxservice.h @@ -48,13 +48,14 @@ public: void sort(); int setCurrentMarked(bool); - int cursorSet(int n); - int cursorGet(); + protected: void cursorHome(); void cursorEnd(); int cursorMove(int count=1); int cursorValid(); + int cursorSet(int n); + int cursorGet(); void cursorSave(); void cursorRestore(); -- 2.30.2