projects
/
matthijs
/
upstream
/
mobilegtd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make KeyBindingView extend View.
[matthijs/upstream/mobilegtd.git]
/
src
/
gui
/
gui.py
diff --git
a/src/gui/gui.py
b/src/gui/gui.py
index a8f217164e1d3b399dc6e63a683be89e814d2e0e..2661286b881b63d728b36526f7380113e80a36e5 100644
(file)
--- a/
src/gui/gui.py
+++ b/
src/gui/gui.py
@@
-149,10
+149,14
@@
class View(object):
class ListView(View):
def __init__(self):
super(ListView, self).__init__()
class ListView(View):
def __init__(self):
super(ListView, self).__init__()
- self.set_view(appuifw.Listbox(self.items(),self.
change_entry
))
+ self.set_view(appuifw.Listbox(self.items(),self.
entry_selected
))
- def change_entry(self):
- pass
+ def entry_selected(self):
+ """
+ This function is called when the user selects an an entry (e.g.,
+ navigates to it and push the ok button).
+ """
+ super(ListView).entry_selected()
def update(self,subject=None):
#logger.log(u'Updated %s'%repr(self))
def update(self,subject=None):
#logger.log(u'Updated %s'%repr(self))
@@
-214,7
+218,7
@@
class WidgetBasedListView(ListView):
return self.widgets[self.selected_index()]
return self.widgets[self.selected_index()]
-class KeyBindingView(
object
):
+class KeyBindingView(
View
):
def __init__(self):
self.binding_map = {}
def __init__(self):
self.binding_map = {}
@@
-306,7
+310,7
@@
class EditableListView(SearchableListView,KeyBindingView):
key_and_menu_bindings.append((get_key(key),key,description,execute_and_update_function))
return key_and_menu_bindings
key_and_menu_bindings.append((get_key(key),key,description,execute_and_update_function))
return key_and_menu_bindings
- def
change_entry
(self):
+ def
entry_selected
(self):
self.current_widget().change()
self.refresh()
def execute_and_update(self,function):
self.current_widget().change()
self.refresh()
def execute_and_update(self,function):