diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-04-16 23:17:13 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-04-16 23:17:13 +0000 |
commit | d209115ba38e1f5082ecdf702782da0f09a727d2 (patch) | |
tree | 16229621c009c052580c6152892a945af94e5bba /alert_box.c | |
parent | a0146ed5bedbbee168eb8f0fc226cd56fa1dbd92 (diff) |
Add a "report_failure()" routine to allow dissectors to report arbitrary
errors to the user. Use that, rather than "g_warning()", in the
Diameter dissector to report errors reading the dictionary.
Make the format argument to "simple_dialog()" a "const" pointer.
Fix up the read-error message in Tethereal to end with a newline.
If a simple dialog is requested before the main window or the
capture-control window is popped up, queue it up and pop the queued
messages up once the main or capture-control window is displayed.
svn path=/trunk/; revision=10616
Diffstat (limited to 'alert_box.c')
-rw-r--r-- | alert_box.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/alert_box.c b/alert_box.c index 2bb611fa83..3dca87a893 100644 --- a/alert_box.c +++ b/alert_box.c @@ -2,7 +2,7 @@ * Routines to put up various "standard" alert boxes used in multiple * places * - * $Id: alert_box.c,v 1.5 2004/03/23 21:19:55 guy Exp $ + * $Id: alert_box.c,v 1.6 2004/04/16 23:16:28 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -39,6 +39,15 @@ #include "simple_dialog.h" /* + * Alert box for general errors. + */ +void +failure_alert_box(const char *msg_format, va_list ap) +{ + vsimple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, msg_format, ap); +} + +/* * Alert box for a failed attempt to open or create a file. * "err" is assumed to be a UNIX-style errno; "for_writing" is TRUE if * the file is being opened for writing and FALSE if it's being opened @@ -65,7 +74,7 @@ void read_failure_alert_box(const char *filename, int err) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, - "An error occurred while reading from the file \"%s\": %s.", + "An error occurred while reading from the file \"%s\": %s.", filename, strerror(err)); } |