aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-02-06 23:16:05 +0000
committerGuy Harris <guy@alum.mit.edu>2005-02-06 23:16:05 +0000
commit1041ccdbe5156a8da17d1f473c996d08fe75aded (patch)
tree152c311e669c82905d58ada025b6f8d7fcee59ab /file.c
parent9a04fd314d15e56dad4bb16f9d3472e27f47b66d (diff)
Don't have "set_menus_for_captured_packets()" call
"main_set_for_capture_file()"; it should only deal with menus, not anything else - and it gets called while the menus are being set up, which is before the main window has been completely created, so "main_widgets_show_or_hide()", which is called by "main_set_for_capture_file()", gets errors trying to show or hide widgets the pointers to which are null. svn path=/trunk/; revision=13328
Diffstat (limited to 'file.c')
-rw-r--r--file.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/file.c b/file.c
index cd2212b987..8f7d7ba1e4 100644
--- a/file.c
+++ b/file.c
@@ -73,6 +73,7 @@
#include "packet-range.h"
#include "print.h"
#include "file.h"
+#include "main_window.h"
#include "menu.h"
#include "util.h"
#include "merge.h"
@@ -289,6 +290,9 @@ cf_close(capture_file *cf)
set_menus_for_capture_in_progress(FALSE);
set_menus_for_selected_tree_row(cf);
+ /* Set up main window for no capture file. */
+ main_set_for_capture_file(FALSE);
+
reset_tap_listeners();
/* We have no file open. */
@@ -475,6 +479,9 @@ cf_read(capture_file *cf)
set_menus_for_capture_file(TRUE);
set_menus_for_unsaved_capture_file(!cf->user_saved);
+ /* Set up main window for a capture file. */
+ main_set_for_capture_file(TRUE);
+
/* Enable menu items that make sense if you have some captured packets. */
set_menus_for_captured_packets(TRUE);
@@ -546,6 +553,9 @@ cf_start_tail(capture_file *cf, const char *fname, const char *iface, gboolean i
packets (yes, I know, we don't have any *yet*). */
set_menus_for_captured_packets(TRUE);
+ /* Set up main window for a capture file. */
+ main_set_for_capture_file(TRUE);
+
capture_msg = g_strdup_printf(" %s: <live capture in progress>", get_interface_descriptive_name(iface));
statusbar_push_file_msg(capture_msg);
@@ -673,6 +683,9 @@ cf_finish_tail(capture_file *cf, int *err)
set_menus_for_capture_file(TRUE);
set_menus_for_unsaved_capture_file(!cf->user_saved);
+ /* Set up main window for a capture file. */
+ main_set_for_capture_file(TRUE);
+
if (*err != 0) {
/* We got an error reading the capture file.
XXX - pop up a dialog box? */