method for destroying GtkFileSelection



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




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