[prev in list] [next in list] [prev in thread] [next in thread]
List: gtk-app-devel
Subject: Re: method for destroying GtkFileSelection
From: Tristan Van Berkom <vantr () touchtunes ! com>
Date: 2003-03-28 15:12:14
[Download RAW message or body]
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
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic