If we do a Save or Save As with a move, don't reread the capture file,
authorGuy Harris <guy@alum.mit.edu>
Tue, 5 Jun 2012 06:52:18 +0000 (06:52 -0000)
committerGuy Harris <guy@alum.mit.edu>
Tue, 5 Jun 2012 06:52:18 +0000 (06:52 -0000)
commit9fe3d4b4f356084e8631a972e0217f02e344ff3e
treedb60aec8b9e377d0ec0b77768b5c2b872d87cb64
parent1d27ce5d9962520e0d37f9a424f02b3448934207
If we do a Save or Save As with a move, don't reread the capture file,
just tweak the elements in the capture_file structure as necessary and
poke the UI to update stuff such as the windows title.

If we do a Save or Save As with a copy, don't reread the capture file,
just close the old wtap, open a wtap for the copy, and tweak the
elements in the capture_file structure as necessary and poke the UI to
update stuff such as the windows title.

Otherwise, don't do a full read-and-dissect pass on the capture file,
just close the old wtap, open a wtap for the new file, tweak the
elements in the capture_file structure as necessary and poke the UI to
update stuff such as the windows title, and rescan the file to update
the packet offsets (and cause Wiretap to regenerate, for a gzipped file,
the information needed to support fast random access to the gzipped
file).

This should speed up Save and Save As a bit, as well as removing some
glitches in the UI (e.g., you won't see the packet list disappear and
reappear).

svn path=/trunk/; revision=43101
file.c
file.h
ui/gtk/main.c
ui/gtk/main_statusbar.c