summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-12-28 13:46:31 +0000
committerJohan Dahlin <zilch@src.gnome.org>2002-12-28 13:46:31 +0000
commitcbd5c7c301581299422fb89409e43e45d705df96 (patch)
treec98e650c2ac53f7e50f10ead3d2b2025e97b0b99
parentc5c371f4efa3958297348e29e56e081abf7586b3 (diff)
downloadpygtk-cbd5c7c301581299422fb89409e43e45d705df96.tar.gz
codegen/codegen.py (GObjectWrapper.get_initial_constructor_substdict)$
2002-12-28 Jeremy Katz <katzj@redhat.com> * codegen/codegen.py (GObjectWrapper.get_initial_constructor_substdict)$ GtkInvisible is a toplevel like GtkWindow and needs to be handled similarly for reference counting.
-rw-r--r--ChangeLog6
-rw-r--r--codegen/codegen.py2
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 5834c492..e3e87fc7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-12-28 Jeremy Katz <katzj@redhat.com>
+
+ * codegen/codegen.py (GObjectWrapper.get_initial_constructor_substdict):
+ GtkInvisible is a toplevel like GtkWindow and needs to be handled
+ similarly for reference counting.
+
2002-12-28 Johan Dahlin <jdahlin@async.com.br>
* gtk/gtk.defs: Added -1 as default to second parameter, patch by
diff --git a/codegen/codegen.py b/codegen/codegen.py
index b5070646..9e42b0cd 100644
--- a/codegen/codegen.py
+++ b/codegen/codegen.py
@@ -487,6 +487,8 @@ class GObjectWrapper(Wrapper):
substdict = Wrapper.get_initial_constructor_substdict(self)
if argtypes.matcher.object_is_a(self.objinfo.c_name, 'GtkWindow'):
substdict['aftercreate'] = " g_object_ref(self->obj); /* we don't own the first reference of windows */\n"
+ elif argtypes.matcher.object_is_a(self.objinfo.c_name, 'GtkInvisible'):
+ substdict['aftercreate'] = " g_object_ref(self->obj); /* we don't own the first reference of invisibles */\n"
else:
substdict['aftercreate'] = ''
return substdict