From d7a07deb195bfe51ad13096c23876babf2db5238 Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Sun, 18 Sep 2016 23:00:07 +0200 Subject: [PATCH] Qt: fix some menus activation when stopping a capture Call MainWindow::setMenusForCaptureFile() once the capture is finished While we are at it, let's deactivate Export PDU and Export Packet Bytes menus while capturing Bug: 12071 Bug: 12898 Change-Id: I8ab9d531135790b51cd630d3f548d0c47a4a60a5 Reviewed-on: https://code.wireshark.org/review/17784 Reviewed-by: Pascal Quantin Petri-Dish: Pascal Quantin Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte --- ui/qt/main_window.cpp | 4 ++-- ui/qt/main_window_slots.cpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index 573f4adeda..e857147423 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -2072,8 +2072,8 @@ void MainWindow::setMenusForCaptureInProgress(bool capture_in_progress) { main_ui_->actionFileExportAsPSML->setEnabled(capture_in_progress); main_ui_->actionFileExportAsJSON->setEnabled(capture_in_progress); - main_ui_->actionFileExportPacketBytes->setEnabled(capture_in_progress); - main_ui_->actionFileExportPDU->setEnabled(capture_in_progress); + main_ui_->actionFileExportPacketBytes->setEnabled(!capture_in_progress); + main_ui_->actionFileExportPDU->setEnabled(!capture_in_progress); main_ui_->actionFileExportSSLSessionKeys->setEnabled(capture_in_progress); foreach (QAction *eo_action, main_ui_->menuFileExportObjects->actions()) { diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index ea3e05b5f2..3bcc27249b 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -623,6 +623,7 @@ void MainWindow::captureCaptureUpdateFinished(capture_session *) { /* Enable menu items that make sense if you're not currently running a capture. */ setForCaptureInProgress(false); + setMenusForCaptureFile(); setWindowIcon(wsApp->normalIcon()); @@ -646,6 +647,7 @@ void MainWindow::captureCaptureFixedFinished(capture_session *) { /* Enable menu items that make sense if you're not currently running a capture. */ setForCaptureInProgress(false); + setMenusForCaptureFile(); setWindowIcon(wsApp->normalIcon());