diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-02-22 22:22:47 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-02-22 22:22:47 +0000 |
commit | ca86d812b3a7a698effab343564d01522df15a64 (patch) | |
tree | 5acbc3a65487ceaf39079962aa57417cbd4a329f | |
parent | 62d083525e7749fae48d608f7edd3c6d0cf03aef (diff) |
From Greg Morris: if a search reaches the end or beginning of the list,
pop up an alert box letting the user know, and asking whether they want
to continue the search.
svn path=/trunk/; revision=10184
-rw-r--r-- | file.c | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -1,7 +1,7 @@ /* file.c * File I/O routines * - * $Id: file.c,v 1.364 2004/02/21 12:58:41 ulfl Exp $ + * $Id: file.c,v 1.365 2004/02/22 22:22:47 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -141,7 +141,6 @@ typedef struct { gint format; /* text or PostScript */ } print_data; - int cf_open(char *fname, gboolean is_tempfile, capture_file *cf) { @@ -2253,13 +2252,26 @@ find_packet(capture_file *cf, if (cf->sbackward) { /* Go on to the previous frame. */ fdata = fdata->prev; - if (fdata == NULL) + if (fdata == NULL) { + /* + * XXX - other apps have a bit more of a detailed message + * for this, and instead of offering "OK" and "Cancel", + * they offer things such as "Continue" and "Cancel"; + * we need an API for popping up alert boxes with + * {Verb} and "Cancel". + */ + simple_dialog(ESD_TYPE_CONFIRMATION, ESD_BTN_OK, + "We have reached the beginning of the file\n\n Click OK to continue the search from the end of the file."); fdata = cf->plist_end; /* wrap around */ + } } else { /* Go on to the next frame. */ fdata = fdata->next; - if (fdata == NULL) + if (fdata == NULL) { + simple_dialog(ESD_TYPE_CONFIRMATION, ESD_BTN_OK, + "We have reached the end of the file\n\n Click OK to continue the search from the beginning of the file."); fdata = cf->plist; /* wrap around */ + } } count++; |