Ethereal-cvs: [ethereal-cvs] cvs commit: ethereal/gtk main.c main.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: Thu, 30 Sep 1999 01:12:01 -0500 (CDT)
guy         1999/09/30 01:11:56 CDT

  Modified files:
    gtk                  main.c main.h 
  Log:
  If we're given the "-k" flag, don't start the capture until after we've:
  
  	popped up the top-level window (so that it looks like a capture
  	started from "Capture/Start");
  
  	initialized the colors (so that we don't dump core when reading
  	in the capture file);
  
  	popped up any message box for failure to read the preferences
  	file.
  
  This means we start the capture in "main()", rather than in the realize
  callback for the main window, so get rid of that callback.
  
  If we're a child process that's just capturing to a file for our parent
  to read, however, we shouldn't pop up the top-level window, because
  that's our parent's job; when running that child, set its "argv[0]" to a
  special name, so that
  
  	1) it shows up in a "ps" with a special name;
  
  	2) we don't have to invent Yet Another Flag to say "you're the
  	   child".
  
  (We may want to use the name to turn on *all* behaviors that the capture
  child, and only the capture child, should exhibit.)
  
  If "-w" and "-k" were both specified, attempt to open the file specified
  by "-w" and, if that succeeds, set "cf.save_file_fd" to refer to it, so
  that "-w" plus "-k" works again, rather than popping up a "The file to
  which the capture would be saved ... could not be opened: Bad file
  descriptor." message box.
  
  Revision  Changes    Path
  1.10      +62 -45    ethereal/gtk/main.c
  1.5       +1 -2      ethereal/gtk/main.h