Re: g_signal_swapped
- From: Richard Gipps <rgipps netspace net au>
- To: gtk-app-devel-list gnome org
- Subject: Re: g_signal_swapped
- Date: Fri, 18 Jun 2004 22:05:59 +0100
Ignore that question - I just engaged my brain and realized what I have
done wrong - sorry for that!
Richard (very embarrassed) Gipps.
At 21:55 18/06/04, you wrote:
I am converting a GTK+ version 1.2 program I wrote in version to 2.4 and I
am having a few problems with the "response" signal from a gtk dialog
window. I want to 'catch' the response signal and determine if the OK or
Cancel button were clicked. Here is what I have tried:
Unit_Options_wnd = gtk_dialog_new_with_buttons("Units",
NULL,
GTK_DIALOG_MODAL,
GTK_STOCK_CANCEL,
GTK_RESPONSE_NONE,
GTK_STOCK_OK,
GTK_RESPONSE_NONE,
NULL);
g_signal_connect_swapped(GTK_DIALOG(Unit_Options_wnd),
"response",
G_CALLBACK(on_Unit_Options_button_clicked),
Unit_Options_wnd);
.........
void on_Unit_Options_button_clicked(GtkDialog* dialog,gint
response_ID,gpointer user_data)
{
if(response_ID==GTK_RESPONSE_CANCEL)
gtk_widget_destroy(user_data);
else
//do other stuff
}
But when the cancel button is pressed the window does not close. Any ideas??
Richard.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]