aboutsummaryrefslogtreecommitdiffstats
path: root/file.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-05-15 01:50:16 +0000
committerGuy Harris <guy@alum.mit.edu>2000-05-15 01:50:16 +0000
commit9befd25e5011481436888e1ba8bd13edbc379e14 (patch)
treed5e58982bb1965ee02af79de05d53c8f869c5edc /file.h
parentd83e4cb58c57fa314c9ae3f96ab3ac215e68d7b1 (diff)
We can't trust "cf->current_frame" to refer to the frame that was
selected before we started re-colorizing or re-filtering the display, as when the first row is added to the clist, that may be selected and thus made the current frame. This means that we can't find the row corresponding to the previously-selected frame, if any, by checking as each packet is colorized/filtered and see whether its "frame_data" structure is equal to "cf->current_frame", as that'll always say that the first frame in the display is the selected frame. Instead, we recored the value of "cf->current_frame" before we do anything to the clist, have "add_packet_to_packet_list()" return either the row number of the frame (if it passed the filter and thus was added to the clist) or -1 (if it didn't pass the filter and thus wasn't added to the clist), and, after "add_packet_to_packet_list()", if the current frame is the one that was the selected row, remember its row number (if any), and, when we're finished colorizing/filtering the display, make that row the current row if it's not -1 (-1 means that the selected row didn't pass the filter). Also, don't do that until after we've thawed the clist, as the vertical adjustment for the clist doesn't reflect reality until then, and attempting to go to a given row won't work right until the vertical adjustment for the clist reflects reality. Shove all the code to set the selected and focus rows, and to make said row visible, into a routine, so the "Find Frame" and "Go To Frame" code can use it as well. svn path=/trunk/; revision=1959
Diffstat (limited to 'file.h')
-rw-r--r--file.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/file.h b/file.h
index dff9d580cf..4ae6cfc77e 100644
--- a/file.h
+++ b/file.h
@@ -1,7 +1,7 @@
/* file.h
* Definitions for file structures and routines
*
- * $Id: file.h,v 1.65 2000/04/03 08:42:45 guy Exp $
+ * $Id: file.h,v 1.66 2000/05/15 01:50:16 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -109,8 +109,6 @@ typedef struct _capture_file {
frame_data *last_displayed; /* Last frame displayed */
column_info cinfo; /* Column formatting information */
frame_data *current_frame; /* Frame data for current frame */
- int current_row; /* Row in packet display of current frame */
- gboolean current_frame_is_selected; /* TRUE if that frame is selected */
proto_tree *protocol_tree; /* Protocol tree for currently selected packet */
FILE *print_fh; /* File we're printing to */
} capture_file;