diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-02-22 22:22:47 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-02-22 22:22:47 +0000 |
commit | 0d6d5ef86a969932ce2c83fdf2665c966690bd67 (patch) | |
tree | 5acbc3a65487ceaf39079962aa57417cbd4a329f /file.c | |
parent | 58d543dde033dc39c5c728a56cba7bcb3cf8bc47 (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.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10184 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'file.c')
-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++; |