Tweak the order of the UI updates when finishing a live-update capture so that
authorEvan Huus <eapache@gmail.com>
Thu, 20 Dec 2012 04:06:44 +0000 (04:06 -0000)
committerEvan Huus <eapache@gmail.com>
Thu, 20 Dec 2012 04:06:44 +0000 (04:06 -0000)
certain menu items are enabled correctly.

Should fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8108

svn path=/trunk/; revision=46629

ui/gtk/main.c

index 0c79b422520b138afd6fedc129e8f7f2ebd721c8..5bff4c89e74fd17177517b47ed0a5ae4fec9b8cb 100644 (file)
@@ -1621,14 +1621,17 @@ main_capture_cb_capture_update_finished(capture_options *capture_opts)
         add_menu_recent_capture_file(cf->filename);
     }
 
-    /* Update the main window as appropriate */
-    main_update_for_unsaved_changes(cf);
-
     /* Enable menu items that make sense if you're not currently running
      a capture. */
     main_set_for_capture_in_progress(FALSE);
     set_capture_if_dialog_for_capture_in_progress(FALSE);
 
+    /* Update the main window as appropriate. This has to occur AFTER
+     * main_set_for_capture_in_progress() or else some of the menus are
+     * incorrectly disabled (see bug
+     * https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8108) */
+    main_update_for_unsaved_changes(cf);
+
     /* Set up main window for a capture file. */
     main_set_for_capture_file(TRUE);