make all *View classes call their parent constructors.
authorMatthijs Kooijman <matthijs@stdin.nl>
Mon, 17 Aug 2009 21:45:43 +0000 (23:45 +0200)
committerMatthijs Kooijman <matthijs@stdin.nl>
Mon, 17 Aug 2009 21:45:43 +0000 (23:45 +0200)
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

index 0247175fc22ee76eb165184427b36aa257f67cd0..e4b3db05d88086b6aea5f619f31c76aa2384ba34 100644 (file)
@@ -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):