From 7d7c05d2ca68bdd6cc55fc78a1a29c6635790987 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Mon, 29 Oct 2012 19:46:27 +0100 Subject: [PATCH] Pay attention to NO_CANCEL dialog flag --- gtk/xoptions.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/gtk/xoptions.c b/gtk/xoptions.c index 5f4711f..d5ade4c 100644 --- a/gtk/xoptions.c +++ b/gtk/xoptions.c @@ -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", -- 1.7.0.4