From 02898f8b19ec7cdfdae3f1798b9ea42e3875ce70 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Mon, 17 Aug 2009 23:45:43 +0200 Subject: [PATCH] make all *View classes call their parent constructors. This includes the top level classes that inherit from object, and ensures that all constructors will be called in multiple inheritance situations. This removes the need for the explicit call to KeyBindingView's constructor. --- src/gui/gui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/gui.py b/src/gui/gui.py index 0247175..e4b3db0 100644 --- a/src/gui/gui.py +++ b/src/gui/gui.py @@ -105,6 +105,7 @@ def restore_gui(object): class ListView(object): def __init__(self): self.view = appuifw.Listbox(self.items(),self.change_entry) + super(ListView, self).__init__() def set_title(self, title): self.title = title @@ -196,6 +197,7 @@ class KeyBindingView(object): def __init__(self): self.binding_map = {} + super(KeyBindingView,self).__init__() def set_keybindings(self, binding_map): """ @@ -272,7 +274,6 @@ class SearchableListView(WidgetBasedListView): class EditableListView(SearchableListView,KeyBindingView): def __init__(self): - KeyBindingView.__init__(self) super(EditableListView, self).__init__() def key_and_menu_bindings(self,selected_index): -- 2.30.2