Ethereal-cvs: [ethereal-cvs] cvs commit: ethereal file.c file.h

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Sun, 14 May 2000 20:50:22 -0500 (CDT)
guy         2000/05/14 20:50:19 CDT

  Modified files:
    .                    file.c file.h 
  Log:
  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.
  
  Revision  Changes    Path
  1.186     +63 -50    ethereal/file.c
  1.66      +1 -3      ethereal/file.h