Ethereal-cvs: [Ethereal-cvs] cvs commit: ethereal/gtk io_stat.c

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

From: guy@xxxxxxxxxxxx (Guy Harris)
Date: Tue, 13 Jan 2004 15:04:52 -0600 (CST)
guy         2004/01/13 15:04:52 CST

  Modified files:
    gtk                  io_stat.c 
  Log:
  Add a routine "io_stat_reset()" to reset an io_stat_t; have
  "gtk_iostat_reset()" call it, and have calls to
  "gtk_iostat_reset(&io->graphs[0])" just call "io_stat_reset(io)".
  
  Add a routine "io_stat_draw()" to draw an io_stat_t; have
  "gtk_iostat_draw()" call it, and have calls to
  "gtk_iostat_draw(&io->graphs[0])" just call "io_stat_draw(io)".
  
  Add a routine "io_stat_redraw()" to set the "needs_redraw" flag on an
  io_stat_t and call "io_stat_draw()" on it, in order to force a redraw.
  Use that in place of set flag/io_stat_draw pairs.
  
  Add a routine "enable_graph()" to set an io_stat_graph_t's display flag
  to TRUE and register a tap listener for it, and add a routine
  "disable_graph()" to, if an io_stat_graph_t's display flag is set, clear
  it, remove its tap listener, and turn its display button off.  Use
  "disable_graph()" to disable graphs, rather than just turning the
  display flag off, so that we ensure that the invariant "tap listener
  present iff graph enabled" is preserved - the code to destroy an io-stat
  window only removes tap listeners for enabled graphs, so it depends on
  that invariant being preserved.
  
  Check the validity of a display filter by compiling it, not by going
  through the whole sequence of registering a tap listener.
  
  Revision  Changes    Path
  1.55      +100 -123  ethereal/gtk/io_stat.c