[Glade-users] newbie question
- From: james cameron compaq com (James Cameron)
- Subject: [Glade-users] newbie question
- Date: Fri, 15 Jun 2001 09:34:01 +1000
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'.
gboolean
on_about_delete_event (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
gtk_widget_destroy (gtk_widget_get_toplevel (GTK_WIDGET(widget)));
return FALSE;
}
void
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]