diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | codegen/codegen.py | 2 | ||||
-rw-r--r-- | examples/pango/utf8-demo.py | 16 |
3 files changed, 19 insertions, 4 deletions
@@ -1,7 +1,12 @@ 2002-08-19 James Henstridge <james@daa.com.au> + * codegen/codegen.py + (GObjectWrapper.get_initial_constructor_substdict): fix small + typo. + * gtk/gtk.override (_wrap_gtk_dialog_new_with_buttons): ref the widget after constructing it. + (_wrap_gtk_message_dialog_new): same here. * codegen/codegen.py (GObjectWrapper.get_initial_constructor_substdict): add special diff --git a/codegen/codegen.py b/codegen/codegen.py index f6721fe5..b5070646 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" + else: + substdict['aftercreate'] = '' return substdict def get_initial_method_substdict(self, method): diff --git a/examples/pango/utf8-demo.py b/examples/pango/utf8-demo.py index 8d3f07f8..fccbc77e 100644 --- a/examples/pango/utf8-demo.py +++ b/examples/pango/utf8-demo.py @@ -49,12 +49,20 @@ Difference among chinese characters in GB, JIS, KSC, BIG5:\u200E BIG5\t--\t\u5143\u6C23\t\u958B\u767C ''' -w = gtk.Window() -w.set_border_width(10) +win = gtk.Window() +win.connect('destroy', gtk.mainquit) +win.set_default_size(600, 400) + +swin = gtk.ScrolledWindow() +swin.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) +win.add(swin) +swin.show() + l = gtk.Label(hellos) -w.add(l) +swin.add_with_viewport(l) l.show() -w.show() + +win.show() gtk.main() |