aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-02-12 22:24:28 +0000
committerGuy Harris <guy@alum.mit.edu>2004-02-12 22:24:28 +0000
commit90cf9a6b7b850a9ddd69baf1eb8535dde06a3510 (patch)
treebff8e905f0757abd0edb742830da25baaac19e01
parent26536d7a419e04261f04035b287a050889e77a98 (diff)
The HIG's and/or GUI toolkit documentation for:
Mac OS X GNOME Qt KDE Windows all indicate that {message,alert} boxes are modal, at least for the window to which they apply. (Presumably the idea is that not forcing the user to pay attention to the alert box, and allowing more than one alert box to be up for a given window, causes more problems than not letting the user do stuff to that window in order to figure out what the underlying problem is or figure out what to do to fix it - the message should be sufficient, in most if not all cases, to let you know what the problem is.) Make "simple_dialog()" unconditionally make the alert box modal, and get rid of ESD_TYPE_MODAL. XXX - we need to make it possible to make an alert box modal for a given window, rather than just the top-level window. svn path=/trunk/; revision=10051
-rw-r--r--gtk/capture_dlg.c5
-rw-r--r--gtk/color_dlg.c5
-rw-r--r--gtk/dfilter_expr_dlg.c11
-rw-r--r--gtk/file_dlg.c8
-rw-r--r--gtk/gui_prefs.c8
-rw-r--r--gtk/main.c10
-rw-r--r--gtk/menu.c5
-rw-r--r--gtk/rtp_analysis.c49
-rw-r--r--gtk/rtp_stream.c6
-rw-r--r--gtk/simple_dialog.c7
-rw-r--r--simple_dialog.h6
11 files changed, 53 insertions, 67 deletions
diff --git a/gtk/capture_dlg.c b/gtk/capture_dlg.c
index c0b059f689..53609c5d8c 100644
--- a/gtk/capture_dlg.c
+++ b/gtk/capture_dlg.c
@@ -1,7 +1,7 @@
/* capture_dlg.c
* Routines for packet capture windows
*
- * $Id: capture_dlg.c,v 1.103 2004/02/11 03:55:48 guy Exp $
+ * $Id: capture_dlg.c,v 1.104 2004/02/12 22:24:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -785,8 +785,7 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_)
if((cfile.state != FILE_CLOSED) && !cfile.user_saved) {
/* user didn't saved his current file, ask him */
- dialog = simple_dialog(ESD_TYPE_CONFIRMATION | ESD_TYPE_MODAL,
- ESD_BTNS_YES_NO_CANCEL,
+ dialog = simple_dialog(ESD_TYPE_CONFIRMATION, ESD_BTNS_YES_NO_CANCEL,
PRIMARY_TEXT_START "Save capture file before starting a new capture?" PRIMARY_TEXT_END "\n\n"
"If you start a new capture without saving, your current capture data will be discarded.");
simple_dialog_set_cb(dialog, capture_prep_answered_cb, NULL);
diff --git a/gtk/color_dlg.c b/gtk/color_dlg.c
index 1f3302bf0e..7cd3ecde62 100644
--- a/gtk/color_dlg.c
+++ b/gtk/color_dlg.c
@@ -1,7 +1,7 @@
/* color_dlg.c
* Definitions for dialog boxes for color filters
*
- * $Id: color_dlg.c,v 1.41 2004/02/09 18:25:48 ulfl Exp $
+ * $Id: color_dlg.c,v 1.42 2004/02/12 22:24:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1134,8 +1134,7 @@ color_clear_cb(GtkWidget *widget, gpointer data _U_) {
gpointer dialog;
/* ask user, if he/she is really sure */
- dialog = simple_dialog(ESD_TYPE_WARN | ESD_TYPE_MODAL,
- ESD_BTN_CLEAR | ESD_BTN_CANCEL,
+ dialog = simple_dialog(ESD_TYPE_WARN, ESD_BTN_CLEAR | ESD_BTN_CANCEL,
PRIMARY_TEXT_START "Remove all your personal color settings?" PRIMARY_TEXT_END "\n\n"
"This will revert the color settings to global defaults.\n\n"
"Are you really sure?");
diff --git a/gtk/dfilter_expr_dlg.c b/gtk/dfilter_expr_dlg.c
index 7c7e0410a1..193a8eb1ed 100644
--- a/gtk/dfilter_expr_dlg.c
+++ b/gtk/dfilter_expr_dlg.c
@@ -7,7 +7,7 @@
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com> and
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: dfilter_expr_dlg.c,v 1.50 2004/02/06 19:19:09 ulfl Exp $
+ * $Id: dfilter_expr_dlg.c,v 1.51 2004/02/12 22:24:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -778,8 +778,7 @@ dfilter_report_bad_value(char *format, ...)
vsnprintf(error_msg_buf, sizeof error_msg_buf, format, args);
va_end(args);
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
- "%s", error_msg_buf);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_msg_buf);
}
static void
@@ -900,11 +899,11 @@ dfilter_expr_dlg_accept_cb(GtkWidget *w, gpointer filter_te_arg)
can_compare = TRUE; /* not a comparison */
if (!can_compare) {
if (range_str == NULL) {
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"That field cannot be tested with \"%s\".",
item_str);
} else {
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Ranges of that field cannot be tested with \"%s\".",
item_str);
}
@@ -924,7 +923,7 @@ dfilter_expr_dlg_accept_cb(GtkWidget *w, gpointer filter_te_arg)
* This field takes a value, but they didn't supply
* one.
*/
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"That field must be compared with a value, "
"but you didn't specify a value with which to "
"compare it.");
diff --git a/gtk/file_dlg.c b/gtk/file_dlg.c
index d5dc9fc914..c929923b25 100644
--- a/gtk/file_dlg.c
+++ b/gtk/file_dlg.c
@@ -1,7 +1,7 @@
/* file_dlg.c
* Dialog boxes for handling files
*
- * $Id: file_dlg.c,v 1.95 2004/02/11 03:55:48 guy Exp $
+ * $Id: file_dlg.c,v 1.96 2004/02/12 22:24:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -364,8 +364,7 @@ file_open_cmd_cb(GtkWidget *widget, gpointer data _U_) {
if((cfile.state != FILE_CLOSED) && !cfile.user_saved) {
/* user didn't saved his current file, ask him */
- dialog = simple_dialog(ESD_TYPE_CONFIRMATION | ESD_TYPE_MODAL,
- ESD_BTNS_YES_NO_CANCEL,
+ dialog = simple_dialog(ESD_TYPE_CONFIRMATION, ESD_BTNS_YES_NO_CANCEL,
PRIMARY_TEXT_START "Save capture file before opening a new one?" PRIMARY_TEXT_END "\n\n"
"If you open a new capture file without saving, your capture data will be discarded.");
simple_dialog_set_cb(dialog, file_open_answered_cb, widget);
@@ -491,8 +490,7 @@ file_close_cmd_cb(GtkWidget *widget _U_, gpointer data _U_) {
if((cfile.state != FILE_CLOSED) && !cfile.user_saved) {
/* user didn't saved his current file, ask him */
- dialog = simple_dialog(ESD_TYPE_CONFIRMATION | ESD_TYPE_MODAL,
- ESD_BTNS_YES_NO_CANCEL,
+ dialog = simple_dialog(ESD_TYPE_CONFIRMATION, ESD_BTNS_YES_NO_CANCEL,
PRIMARY_TEXT_START "Save capture file before closing it?" PRIMARY_TEXT_END "\n\n"
"If you close without saving, your capture data will be discarded.");
diff --git a/gtk/gui_prefs.c b/gtk/gui_prefs.c
index 81701a20cd..93bdef8fa0 100644
--- a/gtk/gui_prefs.c
+++ b/gtk/gui_prefs.c
@@ -1,7 +1,7 @@
/* gui_prefs.c
* Dialog box for GUI preferences
*
- * $Id: gui_prefs.c,v 1.63 2004/02/01 20:28:11 ulfl Exp $
+ * $Id: gui_prefs.c,v 1.64 2004/02/12 22:24:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -341,7 +341,7 @@ font_fetch(void)
/* No font was selected; let the user know, but don't
tear down the font selection dialog, so they can
try again. */
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"You have not selected a font.");
return FALSE;
}
@@ -359,7 +359,7 @@ font_fetch(void)
/* Oops, that font didn't work.
Tell the user, but don't tear down the font selection
dialog, so that they can try again. */
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"The font you selected cannot be loaded.");
g_free(font_name);
@@ -379,7 +379,7 @@ font_fetch(void)
/* Oops, that font didn't work.
Tell the user, but don't tear down the font selection
dialog, so that they can try again. */
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"The font you selected doesn't have a boldface version.");
g_free(font_name);
diff --git a/gtk/main.c b/gtk/main.c
index cecc6dcbb0..3bf04a8246 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -1,6 +1,6 @@
/* main.c
*
- * $Id: main.c,v 1.394 2004/02/11 09:19:54 guy Exp $
+ * $Id: main.c,v 1.395 2004/02/12 22:24:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1211,8 +1211,7 @@ main_window_delete_event_cb(GtkWidget *widget _U_, GdkEvent *event _U_, gpointer
if((cfile.state != FILE_CLOSED) && !cfile.user_saved) {
/* user didn't saved his current file, ask him */
- dialog = simple_dialog(ESD_TYPE_CONFIRMATION | ESD_TYPE_MODAL,
- ESD_BTNS_YES_NO_CANCEL,
+ dialog = simple_dialog(ESD_TYPE_CONFIRMATION, ESD_BTNS_YES_NO_CANCEL,
PRIMARY_TEXT_START "Save capture file before program quit?" PRIMARY_TEXT_END "\n\n"
"If you quit the program without saving, your capture data will be discarded.");
simple_dialog_set_cb(dialog, file_quit_answered_cb, NULL);
@@ -1333,8 +1332,7 @@ file_quit_cmd_cb(GtkWidget *widget _U_, gpointer data _U_)
if((cfile.state != FILE_CLOSED) && !cfile.user_saved) {
/* user didn't saved his current file, ask him */
- dialog = simple_dialog(ESD_TYPE_CONFIRMATION | ESD_TYPE_MODAL,
- ESD_BTNS_YES_NO_CANCEL,
+ dialog = simple_dialog(ESD_TYPE_CONFIRMATION, ESD_BTNS_YES_NO_CANCEL,
PRIMARY_TEXT_START "Save capture file before program quit?" PRIMARY_TEXT_END "\n\n"
"If you quit the program without saving, your capture data will be discarded.");
simple_dialog_set_cb(dialog, file_quit_answered_cb, NULL);
@@ -1765,7 +1763,7 @@ GtkSelectionData *selection_data, guint info, guint t _U_, gpointer data _U_)
/* ask the user to save it's current capture file first */
if((cfile.state != FILE_CLOSED) && !cfile.user_saved) {
/* user didn't saved his current file, ask him */
- dialog = simple_dialog(ESD_TYPE_CONFIRMATION | ESD_TYPE_MODAL,
+ dialog = simple_dialog(ESD_TYPE_CONFIRMATION,
ESD_BTNS_YES_NO_CANCEL,
PRIMARY_TEXT_START "Save capture file before opening a new one?" PRIMARY_TEXT_END "\n\n"
"If you open a new capture file without saving, your current capture data will be discarded.");
diff --git a/gtk/menu.c b/gtk/menu.c
index 46a15ec606..e4b3f0cae6 100644
--- a/gtk/menu.c
+++ b/gtk/menu.c
@@ -1,7 +1,7 @@
/* menu.c
* Menu routines
*
- * $Id: menu.c,v 1.162 2004/02/11 04:28:48 guy Exp $
+ * $Id: menu.c,v 1.163 2004/02/12 22:24:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -839,8 +839,7 @@ menu_open_recent_file_cmd_cb(GtkWidget *widget, gpointer data _U_) {
if((cfile.state != FILE_CLOSED) && !cfile.user_saved) {
/* user didn't saved his current file, ask him */
- dialog = simple_dialog(ESD_TYPE_CONFIRMATION | ESD_TYPE_MODAL,
- ESD_BTNS_YES_NO_CANCEL,
+ dialog = simple_dialog(ESD_TYPE_CONFIRMATION, ESD_BTNS_YES_NO_CANCEL,
PRIMARY_TEXT_START "Save capture file before opening a new one?" PRIMARY_TEXT_END "\n\n"
"If you open a new capture file without saving, your current capture data will be discarded.");
simple_dialog_set_cb(dialog, menu_open_recent_file_answered_cb, widget);
diff --git a/gtk/rtp_analysis.c b/gtk/rtp_analysis.c
index 0e693db716..713d61f3dd 100644
--- a/gtk/rtp_analysis.c
+++ b/gtk/rtp_analysis.c
@@ -1,7 +1,7 @@
/* rtp_analysis.c
* RTP analysis addition for ethereal
*
- * $Id: rtp_analysis.c,v 1.35 2004/02/11 04:17:04 guy Exp $
+ * $Id: rtp_analysis.c,v 1.36 2004/02/12 22:24:28 guy Exp $
*
* Copyright 2003, Alcatel Business Systems
* By Lars Ruoff <lars.ruoff@gmx.net>
@@ -875,7 +875,7 @@ static void on_refresh_bt_clicked(GtkWidget *bt _U_, user_data_t *user_data _U_)
/* try to compile the filter. */
strcpy(filter_text,"rtp && ip");
if (!dfilter_compile(filter_text, &sfcode)) {
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK, dfilter_error_msg);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, dfilter_error_msg);
return;
}
@@ -894,7 +894,7 @@ static void on_refresh_bt_clicked(GtkWidget *bt _U_, user_data_t *user_data _U_)
error_string = register_tap_listener("rtp", user_data, filter_text,
rtp_reset, rtp_packet, rtp_draw);
if (error_string != NULL) {
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK, error_string->str);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, error_string->str);
g_string_free(error_string, TRUE);
return;
}
@@ -1427,22 +1427,22 @@ static void save_voice_as_ok_cb(GtkWidget *ok_bt _U_, gpointer fs _U_)
/* there are many combinations here, we just exit when first matches */
if ((user_data->forward.saveinfo.error_type == TAP_RTP_WRONG_CODEC) ||
(user_data->reversed.saveinfo.error_type == TAP_RTP_WRONG_CODEC))
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't save in a file: Unsupported codec!");
else if ((user_data->forward.saveinfo.error_type == TAP_RTP_WRONG_LENGTH) ||
(user_data->reversed.saveinfo.error_type == TAP_RTP_WRONG_LENGTH))
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't save in a file: Wrong length of captured packets!");
else if ((user_data->forward.saveinfo.error_type == TAP_RTP_PADDING_ERROR) ||
(user_data->reversed.saveinfo.error_type == TAP_RTP_PADDING_ERROR))
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't save in a file: RTP data with padding!");
else if ((user_data->forward.saveinfo.error_type == TAP_RTP_SHORT_FRAME) ||
(user_data->reversed.saveinfo.error_type == TAP_RTP_SHORT_FRAME))
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't save in a file: Not all data in all packets was captured!");
else
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't save in a file: File I/O problem!");
return;
}
@@ -1450,19 +1450,19 @@ static void save_voice_as_ok_cb(GtkWidget *ok_bt _U_, gpointer fs _U_)
else if ((user_data->forward.saveinfo.saved == FALSE) && ((GTK_TOGGLE_BUTTON (forw)->active) ||
(GTK_TOGGLE_BUTTON (both)->active))) {
if (user_data->forward.saveinfo.error_type == TAP_RTP_WRONG_CODEC)
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't save forward direction in a file: Unsupported codec!");
else if (user_data->forward.saveinfo.error_type == TAP_RTP_WRONG_LENGTH)
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't save forward direction in a file: Wrong length of captured packets!");
else if (user_data->forward.saveinfo.error_type == TAP_RTP_PADDING_ERROR)
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't save forward direction in a file: RTP data with padding!");
else if (user_data->forward.saveinfo.error_type == TAP_RTP_SHORT_FRAME)
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't save forward direction in a file: Not all data in all packets was captured!");
else
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't save forward direction in a file: File I/O problem!");
return;
}
@@ -1470,22 +1470,22 @@ static void save_voice_as_ok_cb(GtkWidget *ok_bt _U_, gpointer fs _U_)
else if ((user_data->reversed.saveinfo.saved == FALSE) && ((GTK_TOGGLE_BUTTON (rev)->active) ||
(GTK_TOGGLE_BUTTON (both)->active))) {
if (user_data->reversed.saveinfo.error_type == TAP_RTP_WRONG_CODEC)
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't save reversed direction in a file: Unsupported codec!");
else if (user_data->reversed.saveinfo.error_type == TAP_RTP_WRONG_LENGTH)
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't save reversed direction in a file: Wrong length of captured packets!");
else if (user_data->reversed.saveinfo.error_type == TAP_RTP_PADDING_ERROR)
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't save reversed direction in a file: RTP data with padding!");
else if (user_data->forward.saveinfo.error_type == TAP_RTP_SHORT_FRAME)
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't save reversed direction in a file: Not all data in all packets was captured!");
else if (user_data->reversed.saveinfo.error_type == TAP_RTP_NO_DATA)
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't save reversed direction in a file: No RTP data!");
else
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't save reversed direction in a file: File I/O problem!");
return;
}
@@ -1506,7 +1506,7 @@ static void save_voice_as_ok_cb(GtkWidget *ok_bt _U_, gpointer fs _U_)
if(!copy_file(g_dest, channels/*, format*/, user_data)) {
/* XXX - report the error type! */
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"An error occured while saving voice in a file!");
return;
}
@@ -2232,8 +2232,7 @@ void rtp_analysis_cb(GtkWidget *w _U_, gpointer data _U_)
/* Try to compile the filter. */
strcpy(filter_text,"rtp && ip");
if (!dfilter_compile(filter_text, &sfcode)) {
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
- dfilter_error_msg);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, dfilter_error_msg);
return;
}
/* we load the current file into cf variable */
@@ -2247,7 +2246,7 @@ void rtp_analysis_cb(GtkWidget *w _U_, gpointer data _U_)
/* dissect the current frame */
if (!wtap_seek_read(cf->wth, fdata->file_off, &cf->pseudo_header,
cf->pd, fdata->cap_len, &err, &err_info)) {
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
cf_read_error_message(err, err_info), cf->filename);
return;
}
@@ -2260,7 +2259,7 @@ void rtp_analysis_cb(GtkWidget *w _U_, gpointer data _U_)
frame_matched = dfilter_apply_edt(sfcode, edt);
if (frame_matched != 1) {
epan_dissect_free(edt);
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"You didn't choose a RTP packet!");
return;
}
@@ -2279,7 +2278,7 @@ void rtp_analysis_cb(GtkWidget *w _U_, gpointer data _U_)
/* now we need the SSRC value of the current frame */
if (!get_int_value_from_proto_tree(edt->tree, "rtp", "rtp.ssrc", &ssrc_fwd)) {
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"SSRC value couldn't be found!");
return;
}
diff --git a/gtk/rtp_stream.c b/gtk/rtp_stream.c
index 2c2a9300e7..d02ea5a481 100644
--- a/gtk/rtp_stream.c
+++ b/gtk/rtp_stream.c
@@ -1,7 +1,7 @@
/* rtp_stream.c
* RTP streams summary addition for ethereal
*
- * $Id: rtp_stream.c,v 1.13 2004/02/11 01:37:13 guy Exp $
+ * $Id: rtp_stream.c,v 1.14 2004/02/12 22:24:28 guy Exp $
*
* Copyright 2003, Alcatel Business Systems
* By Lars Ruoff <lars.ruoff@gmx.net>
@@ -390,8 +390,8 @@ register_tap_listener_rtp_stream(void)
(void*)rtpstream_reset, (void*)rtpstream_packet, (void*)rtpstream_draw);
if (error_string != NULL) {
- simple_dialog(ESD_TYPE_ERROR | ESD_TYPE_MODAL,
- ESD_BTN_OK, error_string->str);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
+ error_string->str);
g_string_free(error_string, TRUE);
exit(1);
}
diff --git a/gtk/simple_dialog.c b/gtk/simple_dialog.c
index 846d010ed9..4eb24756a7 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.26 2004/02/11 03:55:48 guy Exp $
+ * $Id: simple_dialog.c,v 1.27 2004/02/12 22:24:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -73,7 +73,7 @@ simple_dialog(gint type, gint btn_mask, gchar *msg_format, ...) {
gchar **icon;
/* Main window */
- switch (type & ~ESD_TYPE_MODAL) {
+ switch (type) {
case ESD_TYPE_WARN :
icon = stock_dialog_warning_48_xpm;
break;
@@ -129,8 +129,7 @@ simple_dialog(gint type, gint btn_mask, gchar *msg_format, ...) {
win = dlg_window_new("");
#endif
- if (type & ESD_TYPE_MODAL)
- gtk_window_set_modal(GTK_WINDOW(win), TRUE);
+ gtk_window_set_modal(GTK_WINDOW(win), TRUE);
gtk_container_border_width(GTK_CONTAINER(win), 6);
/* Container for our rows */
diff --git a/simple_dialog.h b/simple_dialog.h
index 3b44d5f6d9..e729aab654 100644
--- a/simple_dialog.h
+++ b/simple_dialog.h
@@ -2,7 +2,7 @@
* Definitions for alert box routines with toolkit-independent APIs but
* toolkit-dependent implementations.
*
- * $Id: simple_dialog.h,v 1.10 2004/02/11 03:55:47 guy Exp $
+ * $Id: simple_dialog.h,v 1.11 2004/02/12 22:24:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -47,10 +47,6 @@ extern "C" {
#define ESD_TYPE_CONFIRMATION 0x02
#define ESD_TYPE_ERROR 0x03
-/* Flag to be ORed with the dialog type, to specify that the dialog is
- to be modal. */
-#define ESD_TYPE_MODAL 0x10
-
/* Which buttons to display. */
#define ESD_BTN_OK 0x01
#define ESD_BTN_CANCEL 0x02