Cure GTK warning in top-level windows
authorH.G. Muller <h.g.muller@hccnet.nl>
Mon, 18 Feb 2013 17:51:44 +0000 (18:51 +0100)
committerH.G. Muller <h.g.muller@hccnet.nl>
Mon, 18 Feb 2013 17:51:44 +0000 (18:51 +0100)
There is no OK button in top-level windows, so the 'response' signal is
not defined, and should not be connected.

gtk/xoptions.c

index 2c48446..00e0d5d 100644 (file)
@@ -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);