aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/dlg_utils.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-07-13 07:15:45 +0000
committerGuy Harris <guy@alum.mit.edu>2004-07-13 07:15:45 +0000
commitfd262f1b97114cc258ace5fee044505ca39c6582 (patch)
treec0d9dbea2af7ce982466a6d3449ade1c1d795ed3 /gtk/dlg_utils.c
parentaaac0102cb0656f3c83df4d9707c6d892472ba66 (diff)
From Daniel Thompson: add additional message/alert box options to
display "Save", "Continue without Saving", and "Cancel", for the "do you want to save?" messages. svn path=/trunk/; revision=11372
Diffstat (limited to 'gtk/dlg_utils.c')
-rw-r--r--gtk/dlg_utils.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gtk/dlg_utils.c b/gtk/dlg_utils.c
index 0a0166bc52..0ace9be012 100644
--- a/gtk/dlg_utils.c
+++ b/gtk/dlg_utils.c
@@ -1,7 +1,7 @@
/* dlg_utils.c
* Utilities to use when constructing dialogs
*
- * $Id: dlg_utils.c,v 1.41 2004/07/12 20:01:41 ulfl Exp $
+ * $Id: dlg_utils.c,v 1.42 2004/07/13 07:15:44 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -100,6 +100,7 @@ dlg_button_row_new(gchar *stock_id_first, ...)
gchar *ok = NULL;
gchar *apply = NULL;
gchar *save = NULL;
+ gchar *dont_save = NULL;
gchar *cancel = NULL;
gchar *close = NULL;
gchar *clear = NULL;
@@ -125,6 +126,8 @@ dlg_button_row_new(gchar *stock_id_first, ...)
apply = stock_id;
} else if (strcmp(stock_id, GTK_STOCK_SAVE) == 0) {
save = stock_id;
+ } else if (strcmp(stock_id, ETHEREAL_STOCK_DONT_SAVE) == 0) {
+ dont_save = stock_id;
} else if (strcmp(stock_id, GTK_STOCK_CANCEL) == 0) {
cancel = stock_id;
} else if (strcmp(stock_id, GTK_STOCK_CLOSE) == 0) {
@@ -256,11 +259,17 @@ dlg_button_row_new(gchar *stock_id_first, ...)
return hbox;
}
if (yes && no && cancel) {
- dlg_button_new(hbox, button_hbox, yes);
dlg_button_new(hbox, button_hbox, no);
dlg_button_new(hbox, button_hbox, cancel);
+ dlg_button_new(hbox, button_hbox, yes);
return hbox;
}
+ if (save && dont_save && cancel) {
+ dlg_button_new(hbox, button_hbox, dont_save);
+ dlg_button_new(hbox, button_hbox, cancel);
+ dlg_button_new(hbox, button_hbox, save);
+ return hbox;
+ }
}
if (buttons == 4) {
if (ok && apply && save && cancel) {
@@ -290,6 +299,7 @@ dlg_button_row_new(gchar *stock_id_first, ...)
if (yes != NULL) dlg_button_new(hbox, button_hbox, yes);
if (no != NULL) dlg_button_new(hbox, button_hbox, no);
if (save != NULL) dlg_button_new(hbox, button_hbox, save);
+ if (dont_save != NULL) dlg_button_new(hbox, button_hbox, dont_save);
if (stop != NULL) dlg_button_new(hbox, button_hbox, stop);
if (close != NULL) dlg_button_new(hbox, button_hbox, close);
if (clear != NULL) dlg_button_new(hbox, button_hbox, clear);