Re: Porting UIs to GtkBuilder
Hi, On Wed, Apr 15, 2009 at 1:35 AM, Tristan Van Berkom t...@gnome.org wrote: On Tue, Apr 14, 2009 at 4:50 PM, Zeeshan Ali (Khattak) zee...@gmail.com wrote: Hi, Reading through planet gnome and related mailing-lists recently, I got the impression that this would be a good time to port my UIs from libglade usage to GtkBuilder. So following the guidelines on this page: http://library.gnome.org/devel/gtk/stable/gtk-migrating-GtkBuilder.html I tried to do so: http://gitorious.org/projects/gupnp-tools/repos/mainline/commits/e8bb5436aa22009b5b312da5a459324382e889c5 Errr, try converting with Glade 3.6 instead of the conversion script ? I just tried glade3 from trunk[1]. One of the three UIs just work fine now but two others don't. One of them hits a fatal on startup: console $ gupnp-universal-cp Gtk-Message: Failed to load module atk-bridge: libatk-bridge.so: cannot open shared object file: No such file or directory ** (gupnp-universal-cp:12727): CRITICAL **: Unable to load the GUI file /opt/gnome2/share/gupnp-tools/gupnp-universal-cp.ui: Unknown internal child: image /console The other one has some minor issues that i might be able to figure on my own: console (gupnp-av-cp:13063): Gtk-WARNING **: Cannot add an object of type GtkMenu to a container of type GtkMenuItem (gupnp-av-cp:13063): Gtk-WARNING **: Cannot add an object of type GtkMenu to a container of type GtkMenuItem (gupnp-av-cp:13063): Gtk-WARNING **: No object called: (gupnp-av-cp:13063): Gtk-WARNING **: No object called: /console -- Regards, Zeeshan Ali (Khattak) FSF member#5124 [1] git://git-mirror.gnome.org/git/glade3 ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Porting UIs to GtkBuilder
Hi Tristan, On Wed, Apr 15, 2009 at 7:43 PM, Tristan Van Berkom t...@gnome.org wrote: It looks like either a.) You did not convert the old Glade file using Glade and or Somehow that was the case. Don't ask me how but now that i rebooted the machine, the glade3 inside my jhbuild does the conversion nicely and my UIs work more or less out of the box. Thanks a lot for your replies. I am extra curious about how you ended up with an internal image in a GtkImageMenuItem (if I'm guessing your Glade file correctly), those are supposed to be internal only in libglade format and referenced (by object type property) in GtkBuilder format. That is gone too now with a fresh conversion using glade3 so I am afraid, we might never find out. :) Thanks again. -- Regards, Zeeshan Ali (Khattak) FSF member#5124 ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Porting UIs to GtkBuilder
Hi, Reading through planet gnome and related mailing-lists recently, I got the impression that this would be a good time to port my UIs from libglade usage to GtkBuilder. So following the guidelines on this page: http://library.gnome.org/devel/gtk/stable/gtk-migrating-GtkBuilder.html I tried to do so: http://gitorious.org/projects/gupnp-tools/repos/mainline/commits/e8bb5436aa22009b5b312da5a459324382e889c5 With this change, everything builds but I get this error from two of my UIs on startup: Gtk:ERROR:gtkbuilder.c:541:_gtk_builder_add: assertion failed: (GTK_IS_BUILDABLE (parent)) Aborted The error from the third UI says a bit more so i think i can debug that on my own, but what is this supposed to mean? -- Regards, Zeeshan Ali (Khattak) FSF member#5124 ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: how to replace a child of a GtkBox ?
Hi Gregory! - How do I remove the old object from the GtkBox ? - How do I free up the old object (image/pixbuf) ? Do I simply unref it ? You don't have to do any of these. As a general rule of thumb in the gobject world, each object keeps it's own reference of the objects it needs. So when you set a new child on a GtkBox object, the GtkBox must unref the old child widget. -- Regards, Zeeshan Ali Khattak FSF member#5124 ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list