[Glade-users] Closing a dialog window
- From: chris-morrison rassalom-technology co uk (Chris Morrison)
- Subject: [Glade-users] Closing a dialog window
- Date: Sat, 29 Jan 2005 12:34:45 +0000
Hi all,
This is probably more of a GNOME programming question than a Glade one
but here goes.
I am writing a small program in Glade that displays a dialog window on
the screen with a Close button. Clicking the close button closes the
dialog and ends the program.
I have placed the following code in the signal handler for the Close
button's click event.
void on_closebutton_clicked(GtkButton *button, gpointer window_ptr)
{
GtkDialog *window = GTK_DIALOG(window_ptr);
gtk_widget_destroy(GTK_WIDGET(window));
}
However, when I click on the Close button nothing happens and the
following message is displayed in the terminal window.
(my-program:5534): Gtk-CRITICAL **: file gtkwidget.c: line 1911
(gtk_widget_destroy): assertion `GTK_IS_WIDGET (widget)' failed
I am a newbie to Linux programming as you can tell, I have just migrated
from Micro$oft Windoze.
Any pointers (no pun intended) would be appreciated.
Regards,
Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]