destroying a dialog



I'm brand new to gtk and love it so far. I'm experiencing what seems
like strange behavior from gtk_widget_destroy. I'm using windowmaker on
Red Hat and egcs. Below are the significant lines. When the
cancel_button is pressed the button itself disappears and not the
dialog.

dialog = gtk_dialog_new();

cancel_button = gtk_button_new_with_label("Cancel");
        
gtk_signal_connect(GTK_OBJECT(cancel_button), "clicked",
                        GTK_SIGNAL_FUNC(gtk_widget_destroy), dialog);

gtk_container_add (GTK_CONTAINER(GTK_DIALOG(dialog)->action_area),
                        cancel_button);

-- 
Regards,
Greg Martin
gregm netidea com




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