-
-class EditableListView(SearchableListView,KeyBindingView):
- def __init__(self):
- super(EditableListView, self).__init__()
-
- def key_and_menu_bindings(self,selected_index):
- key_and_menu_bindings=[]
- for function in applicable_functions(self.widgets[selected_index],self.binding_map)+\
- applicable_functions(self,self.binding_map):
- execute_and_update_function = self.execute_and_update(function)
- (key,description) = self.binding_map[function.__name__]
- key_and_menu_bindings.append((get_key(key),key,description,execute_and_update_function))
- return key_and_menu_bindings
-
- def entry_selected(self):
- self.current_widget().change()
- self.refresh()
- def execute_and_update(self,function):
- return lambda: (function(),self.refresh(),self.index_changed())
-
- def notify(self,item,attribute,new=None,old=None):
- self.refresh()
-