Ethereal-cvs: [Ethereal-cvs] cvs commit: ethereal/gtk follow_dlg.c keys.h main.c

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

From: Guy Harris <guy@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 2 May 2002 22:24:48 -0500 (CDT)
guy         2002/05/02 22:24:48 CDT

  Modified files:
    gtk                  follow_dlg.c keys.h main.c 
  Log:
  Clean up the handling of filter strings:
  
  	have "filter_packets()" make a copy of the filter string handed
  	to it, as it may save the filter string in the "capture_file"
  	structure, and the caller of "filter_packets()" shouldn't have
  	to worry about the string it passed to "filter_packets()" being
  	stashed away somewhere so that it can't just free that string or
  	change it;
  
  	have callers of "filter_packets()" free up the string they
  	handed to it, if the string was allocated and they're done with
  	it;
  
  	plug some memory leaks in "match_selected_cb_do()".
  
  Check for an illegal "action" argument being passed to
  "match_selected_cb_do()".
  
  Move some keys out of "keys.h" into "gtk/main.c", as they're only used
  in "gtk/main.c".
  
  Make the pointer to the filter list a data item for the combo box, as
  it's a copy of the list of strings for the combo box, rather than
  attaching it to the widgets that activate the filter (a pointer to the
  combo box *itself* is a data item for those widgets).
  
  In "filter_activate_cb()", make a copy of the text from the text entry
  field as soon as we fetch it, and use that copy.  Free that copy if
  we didn't add the filter to the filter list.
  
  Don't make a copy of the entire filter list and use that to set the
  combo box's list of items - just use the list itself.  Also, when the
  list is changed, make the new value the data for the combo box (the list
  pointer will actually not be changed, because we happen to be using
  "g_list_append()", but let's not rely on that).
  
  Revision  Changes    Path
  1.23      +4 -1      ethereal/gtk/follow_dlg.c
  1.13      +2 -5      ethereal/gtk/keys.h
  1.246     +43 -35    ethereal/gtk/main.c