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 30ae4e2745bd6290ac47487bfdffca6d57c748f9..2661286b881b63d728b36526f7380113e80a36e5 100644
(file)
--- a/
src/gui/gui.py
+++ b/
src/gui/gui.py
@@
-149,14
+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):
+ 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).
"""
"""
This function is called when the user selects an an entry (e.g.,
navigates to it and push the ok button).
"""
- super(ListView).
change_entry
()
+ 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))
@@
-218,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 = {}
@@
-310,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):