diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-02-11 01:37:13 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-02-11 01:37:13 +0000 |
commit | 14b6bf96d12ff52f9d901b3810f9c4a418d6114d (patch) | |
tree | c57e2f278f03a464cb1198382341b74b6be4de4b /alert_box.c | |
parent | ae4b48d9616ce1364dffe2ae2f959ae5f47117e4 (diff) |
Add "write_failure_alert_box()" to put up an alert box for a failed
attempt to write to a file (or close a file opened for writing).
Get rid of no-longer-needed #includes of <epan/filesystem.h>.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10027 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'alert_box.c')
-rw-r--r-- | alert_box.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/alert_box.c b/alert_box.c index ecd0f734d7..4df5296f9c 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.2 2004/02/11 01:23:23 guy Exp $ + * $Id: alert_box.c,v 1.3 2004/02/11 01:37:11 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -56,6 +56,23 @@ open_failure_alert_box(const char *filename, int err, gboolean for_writing) } /* + * Alert box for a failed attempt to write to a file. + * "err" is assumed to be a UNIX-style errno. + * + * XXX - add explanatory secondary text for at least some of the errors; + * various HIGs suggest that you should, for example, suggest that the + * user remove files if the file system is full. Perhaps that's because + * they're providing guidelines for people less sophisticated than the + * typical Ethereal user is, but.... + */ +void +write_failure_alert_box(const char *filename, int err) +{ + simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, + file_write_error_message(err), filename); +} + +/* * Alert box for an invalid display filter expression. * Assumes "dfilter_error_msg" has been set by "dfilter_compile()" to the * error message for the filter. |