[Glade-users] newbie question

Yves Kurz wrote:
i'm trying to program a little gnome app and now i have a question.
when i create a dialog for examlpe an about dialog, do i need to free
the dialog? how can i do this when it is necessary?

Yes, you need to free it.  A good time would be when it is closed.

In Glade add a signal for 'delete_event' and 'clicked'.

on_about_delete_event                  (GtkWidget       *widget,
                                        GdkEvent        *event,
                                        gpointer         user_data)
  gtk_widget_destroy (gtk_widget_get_toplevel (GTK_WIDGET(widget)));
  return FALSE;

on_about_ok_clicked                    (GtkButton       *button,
                                        gpointer         user_data)
  gtk_widget_destroy (gtk_widget_get_toplevel (GTK_WIDGET(button)));

James Cameron

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