aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/simple_dialog.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-07-13 07:15:45 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-07-13 07:15:45 +0000
commita3f4a3fd6753306fbac8727368749437f0ed3d10 (patch)
treec0d9dbea2af7ce982466a6d3449ade1c1d795ed3 /gtk/simple_dialog.c
parentfe7540a68ce5ed3641d5f8049b91c89e58941e7e (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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11372 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'gtk/simple_dialog.c')
-rw-r--r--gtk/simple_dialog.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/gtk/simple_dialog.c b/gtk/simple_dialog.c
index 386624b270..64f81b0caf 100644
--- a/gtk/simple_dialog.c
+++ b/gtk/simple_dialog.c
@@ -1,7 +1,7 @@
/* simple_dialog.c
* Simple message dialog box routines.
*
- * $Id: simple_dialog.c,v 1.39 2004/06/29 22:21:04 ulfl Exp $
+ * $Id: simple_dialog.c,v 1.40 2004/07/13 07:15:45 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -63,7 +63,7 @@ static GtkWidget *
display_simple_dialog(gint type, gint btn_mask, char *message)
{
GtkWidget *win, *main_vb, *top_hb, *type_pm, *msg_label,
- *bbox, *ok_bt, *yes_bt, *bt;
+ *bbox, *ok_bt, *yes_bt, *bt, *save_bt, *dont_save_bt;
GdkPixmap *pixmap;
GdkBitmap *mask;
GtkStyle *style;
@@ -176,6 +176,9 @@ display_simple_dialog(gint type, gint btn_mask, char *message)
case(ESD_BTNS_YES_NO_CANCEL):
bbox = dlg_button_row_new(GTK_STOCK_YES, GTK_STOCK_NO, GTK_STOCK_CANCEL, NULL);
break;
+ case(ESD_BTNS_SAVE_DONTSAVE_CANCEL):
+ bbox = dlg_button_row_new(GTK_STOCK_SAVE, ETHEREAL_STOCK_DONT_SAVE, GTK_STOCK_CANCEL, NULL);
+ break;
case(ESD_BTNS_YES_NO):
bbox = dlg_button_row_new(GTK_STOCK_YES, GTK_STOCK_NO, NULL);
break;
@@ -193,6 +196,17 @@ display_simple_dialog(gint type, gint btn_mask, char *message)
SIGNAL_CONNECT(ok_bt, "clicked", simple_dialog_cancel_cb, win);
}
+ save_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_SAVE);
+ if (save_bt) {
+ OBJECT_SET_DATA(save_bt, CALLBACK_BTN_KEY, GINT_TO_POINTER(ESD_BTN_SAVE));
+ SIGNAL_CONNECT(save_bt, "clicked", simple_dialog_cancel_cb, win);
+ }
+
+ dont_save_bt = OBJECT_GET_DATA(bbox, ETHEREAL_STOCK_DONT_SAVE);
+ if (dont_save_bt) {
+ OBJECT_SET_DATA(dont_save_bt, CALLBACK_BTN_KEY, GINT_TO_POINTER(ESD_BTN_DONT_SAVE));
+ SIGNAL_CONNECT(dont_save_bt, "clicked", simple_dialog_cancel_cb, win);
+ }
bt = OBJECT_GET_DATA(bbox, GTK_STOCK_CLEAR);
if(bt) {
OBJECT_SET_DATA(bt, CALLBACK_BTN_KEY, GINT_TO_POINTER(ESD_BTN_CLEAR));