Re: When and how to destroy widgets



`g_object_unref(G_OBJECT(table));' should destroy 
everything. if you want to keep your `hscale's after table 
destruction; you'll need to reference them explicitly.
( with `g_object_ref()' )

        -Tristan

Pascal Haakmat wrote:

Hi all,

In my application I dynamically generate a number of GtkHScale's and
organize them in a table something like this:

table = gtk_table_new(...);
for(i...) {
   adjust = gtk_adjustment_new(...);
   hscale[i] = gtk_hscale_new(adjust);
   gtk_table_attach(table, hscale[i], ...);
}

My question is how I would go about cleaning this stuff up once I'm
done with it. Can I just gtk_widget_destroy() the table and have the
GtkHScale's and the GtkAdjustment's disappear automatically? Or do I
need to manually destroy every GtkHScale, then every GtkAdjustment,
and finally the table?

Thanks,
Pascal.

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



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