From: H.G. Muller Date: Mon, 18 Feb 2013 17:51:44 +0000 (+0100) Subject: Cure GTK warning in top-level windows X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=commitdiff_plain;h=c7f8df124bea8b9c1d31ae5884fe07d666aff87e Cure GTK warning in top-level windows There is no OK button in top-level windows, so the 'response' signal is not defined, and should not be connected. --- diff --git a/gtk/xoptions.c b/gtk/xoptions.c index 2c48446..00e0d5d 100644 --- a/gtk/xoptions.c +++ b/gtk/xoptions.c @@ -1511,11 +1511,11 @@ printf("n=%d, h=%d, w=%d\n",n,height,width); } else if((option[i].min & NO_CANCEL)) { button = gtk_dialog_get_widget_for_response(GTK_DIALOG(dialog), GTK_RESPONSE_REJECT); gtk_widget_hide(button); - } - - g_signal_connect (dialog, "response", + g_signal_connect (dialog, "response", G_CALLBACK (GenericPopDown), (gpointer)(intptr_t) dlgNr); + } + g_signal_connect (dialog, "delete-event", G_CALLBACK (GenericPopDown), (gpointer)(intptr_t) dlgNr);