projects
/
matthijs
/
upstream
/
mobilegtd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d3a3851
)
Move the update method to View.
author
Matthijs Kooijman
<matthijs@stdin.nl>
Tue, 3 Nov 2009 08:44:51 +0000
(09:44 +0100)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Tue, 3 Nov 2009 08:44:51 +0000
(09:44 +0100)
src/gui/gui.py
patch
|
blob
|
history
diff --git
a/src/gui/gui.py
b/src/gui/gui.py
index bbb5f0a8bf6609160f74ad52e28ee261712b6845..f03880854f2310bdccda1216bc322c4a60e1277a 100644
(file)
--- a/
src/gui/gui.py
+++ b/
src/gui/gui.py
@@
-138,10
+138,18
@@
class View(object):
self.exit_flag = True
self.lock.signal()
self.exit_flag = True
self.lock.signal()
+ def update(self,subject=None):
+ """
+ Update the current view (e.g., make sure refresh is called). We
+ can't call it directly, since we're in another thread.
+ """
+ if self.lock:
+ self.lock.signal()
+
def refresh(self):
"""
def refresh(self):
"""
- Update the gui after a change in model or some user interaction.
-
Should be filled by subclasses
.
+ Called when the current view must be updated. Never call
+
directly. Subclasses should extend this method, not update
.
"""
appuifw.app.menu=self.get_menu_entries()
"""
appuifw.app.menu=self.get_menu_entries()
@@
-166,12
+174,6
@@
class ListView(View):
"""
pass
"""
pass
- def update(self,subject=None):
- #logger.log(u'Updated %s'%repr(self))
- if self.lock:
- self.lock.signal()
- #pass
-
def index_changed(self,adjustment=None):
if adjustment:
index = self.selected_index() + adjustment
def index_changed(self,adjustment=None):
if adjustment:
index = self.selected_index() + adjustment