[Glade-users] Newbie libglade advice please?

Tristan Van Berkom tvb at gnome.org
Mon Aug 22 10:43:18 EDT 2005


Kim Adil wrote:
[...]
> gboolean on_connect_cancel_button_clicked(GtkWidget *button)
> {
>     gtk_widget_destroy(gtk_widget_get_toplevel(button));

Hmmm, If I'm not mistaken, you can set the user_data in glade
to pass you the object you want as user data to the callback.

Also, you should add `g_object_unref (G_OBJECT (xml));' to balance
the calls to `glade_xml_new (...);' the widgets created by the
xml are not owned by the xml so there is no danger in freeing up
those resources :)

Cheers
                             -Tristan




More information about the Glade-users mailing list