[pygobject] Replace direct parent class call by super()



commit bc7b0b69f651a118a053106fcae2d7c0f2173430
Author: Andrew Grigorev <andrew ei-grad ru>
Date:   Sun May 11 23:54:46 2014 +0400

    Replace direct parent class call by super()
    
    Super works, it just needs the correct class.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=729970

 demos/gtk-demo/gtk-demo.py |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/demos/gtk-demo/gtk-demo.py b/demos/gtk-demo/gtk-demo.py
index 4586a24..e7bc360 100755
--- a/demos/gtk-demo/gtk-demo.py
+++ b/demos/gtk-demo/gtk-demo.py
@@ -68,9 +68,7 @@ class DemoTreeStore(Gtk.TreeStore):
     __gtype_name__ = 'GtkDemoTreeStore'
 
     def __init__(self, *args):
-        #TODO: super does not seem to work here?
-        #super(Gtk.TreeStore, self).__init__(str, Demo, Pango.Style)
-        Gtk.TreeStore.__init__(self, str, Demo, Pango.Style)
+        super(DemoTreeStore, self).__init__(str, Demo, Pango.Style)
 
         self._parent_nodes = {}
 
@@ -114,7 +112,7 @@ class GtkDemoApp(Gtk.Application):
     __gtype_name__ = 'GtkDemoWindow'
 
     def __init__(self):
-        Gtk.Application.__init__(self, application_id='org.gnome.pygobject.gtkdemo')
+        super(GtkDemoApp, self).__init__(application_id='org.gnome.pygobject.gtkdemo')
 
         # Use a GResource to hold the CSS files. Resource bundles are created by
         # the glib-compile-resources program shipped with Glib which takes an xml


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]