gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW)
or
gtk_widget_get_toplevel(widget)
they both have thier particularities;
http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html#gtk-widget-get-toplevel
gives a brief description.
Cheers,
-Tristan
Axel wrote:
>
> Hi
> here is the handler I use to destroy a gtkfileselection, when CANCEL
> button is pushed
>
> void cancel(GtkButton *cancel_button)
> {
> GtkWidget *window;
> window=gtk_wifget_get_parent(GTK_WIDGET(cancel_button));
> window=gtk_wifget_get_parent(window);
> window=gtk_wifget_get_parent(window);
> gtk_widget_destroy(window);
> }
>
> Is there a better way than that? (get the parent widget until you get
> the window)
>
> Axel
>
> _______________________________________________
> gtk-app-devel-list mailing list
> [EMAIL PROTECTED]
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list