diff options
author | Guy Harris <guy@alum.mit.edu> | 1999-07-24 02:42:52 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 1999-07-24 02:42:52 +0000 |
commit | 520e977a5b17a70f44cf96831e4baaf99705a6b9 (patch) | |
tree | 8781eff48e2e9cdae29b4e03098204875e8da8d2 /menu.c | |
parent | 22c9ec90c889228793b1eab2ca99e3dc3851d56e (diff) | |
download | wireshark-520e977a5b17a70f44cf96831e4baaf99705a6b9.tar.gz wireshark-520e977a5b17a70f44cf96831e4baaf99705a6b9.tar.bz2 wireshark-520e977a5b17a70f44cf96831e4baaf99705a6b9.zip |
Have "close_cap_file()" disable all menu items that make sense only if
you have a capture.
Leave the job of enabling and disabling menu items that make sense only
if you have a capture (except for "File/Save" and "File/Save As...", for
now) up to "load_cap_file()", "close_cap_file()", and the like - don't
scatter that stuff throughout the code.
Disable "File/Print Packet" if no packet is selected; enable it only if
a packet is selected.
If there's a selected packet, and a display filter is run:
if the selected packet passed the filter, re-select it;
if the selected packet didn't pass the filter, un-select it.
If we've opened a live "pcap" capture, but can't do the capture because
we can't get the netmask info, or can't parse the capture filter string,
or can't install the filter, close the live capture and the dump and
delete the dump file.
If we failed to open a live "pcap" capture, don't try to read the
capture file - it doesn't exist.
svn path=/trunk/; revision=384
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* menu.c * Menu routines * - * $Id: menu.c,v 1.27 1999/07/23 08:29:23 guy Exp $ + * $Id: menu.c,v 1.28 1999/07/24 02:42:52 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -144,6 +144,7 @@ menus_init(void) { set_menu_sensitivity("/File/Save As...", FALSE); set_menu_sensitivity("/File/Reload", FALSE); set_menu_sensitivity("/File/Print...", FALSE); + set_menu_sensitivity("/File/Print Packet", FALSE); set_menu_sensitivity("/Edit/Cut", FALSE); set_menu_sensitivity("/Edit/Copy", FALSE); set_menu_sensitivity("/Edit/Paste", FALSE); |