Pay attention to NO_CANCEL dialog flag
authorH.G. Muller <h.g.muller@hccnet.nl>
Mon, 29 Oct 2012 18:46:27 +0000 (19:46 +0100)
committerH.G. Muller <h.g.muller@hccnet.nl>
Tue, 6 Nov 2012 13:15:21 +0000 (14:15 +0100)
gtk/xoptions.c

index 5f4711f..d5ade4c 100644 (file)
@@ -1492,9 +1492,12 @@ printf("n=%d, h=%d, w=%d\n",n,height,width);
     gtk_widget_show_all( dialog );    
 
     /* hide OK/cancel buttons */
-    if((option[i].min & 2)) {
+    if((option[i].min & NO_OK)) {
         actionarea = gtk_dialog_get_action_area(GTK_DIALOG(dialog));
         gtk_widget_hide(actionarea);
+    } 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",