diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2015-11-18 00:11:28 +0100 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2015-11-18 07:19:06 +0000 |
commit | 290601ab10fae3aca45b7030f8b7759d0917f32d (patch) | |
tree | 9f9324d7bd8ff038e82dd0177844429ab8d7aaf5 | |
parent | f5648017bd4431f6030ed79465d9840102816945 (diff) | |
download | wireshark-290601ab10fae3aca45b7030f8b7759d0917f32d.tar.gz |
Lua: Disable Reload Lua Plugins while reading file.
Hide the menu item if built without Lua.
Change-Id: I316cddd55064da590eb4167b495a7fb00a41581f
Reviewed-on: https://code.wireshark.org/review/11931
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
(cherry picked from commit 13297438d98e3388d650fc55c2a77d5b52367e1f)
Reviewed-on: https://code.wireshark.org/review/11936
-rw-r--r-- | ui/qt/main_window.cpp | 4 | ||||
-rw-r--r-- | ui/qt/main_window.h | 2 | ||||
-rw-r--r-- | ui/qt/main_window_slots.cpp | 7 |
3 files changed, 9 insertions, 4 deletions
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index 1eb12eebc9..1743bc8e8e 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -251,6 +251,10 @@ MainWindow::MainWindow(QWidget *parent) : interfaceSelectionChanged(); loadWindowGeometry(); +#ifndef HAVE_LUA + main_ui_->actionAnalyzeReloadLuaPlugins->setVisible(false); +#endif + //To prevent users use features before initialization complete //Otherwise unexpected problems may occur setFeaturesEnabled(false); diff --git a/ui/qt/main_window.h b/ui/qt/main_window.h index 835ab2be34..6cddf1b9b2 100644 --- a/ui/qt/main_window.h +++ b/ui/qt/main_window.h @@ -444,9 +444,7 @@ private slots: void on_actionAnalyzeEnabledProtocols_triggered(); void on_actionAnalyzeDecodeAs_triggered(); -#ifdef HAVE_LUA void on_actionAnalyzeReloadLuaPlugins_triggered(); -#endif void openFollowStreamDialog(follow_type_t type); void on_actionAnalyzeFollowTCPStream_triggered(); diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index 5577689c0c..fa5860a92d 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -664,6 +664,8 @@ void MainWindow::captureFileReadStarted(const QString &action) { QString msgtip = QString(); main_ui_->statusBar->pushFileStatus(msg, msgtip); main_ui_->mainStack->setCurrentWidget(&master_split_); + main_ui_->actionAnalyzeReloadLuaPlugins->setEnabled(false); + WiresharkApplication::processEvents(); } @@ -687,6 +689,7 @@ void MainWindow::captureFileReadFinished() { setForCapturedPackets(true); main_ui_->statusBar->setFileName(capture_file_); + main_ui_->actionAnalyzeReloadLuaPlugins->setEnabled(true); packet_list_->captureFileReadFinished(); @@ -2541,9 +2544,9 @@ void MainWindow::on_actionAnalyzeDecodeAs_triggered() wsApp->flushAppSignals(); } -#ifdef HAVE_LUA void MainWindow::on_actionAnalyzeReloadLuaPlugins_triggered() { +#ifdef HAVE_LUA if (wsApp->isReloadingLua()) return; @@ -2566,8 +2569,8 @@ void MainWindow::on_actionAnalyzeReloadLuaPlugins_triggered() wsApp->setReloadingLua(false); SimpleDialog::displayQueuedMessages(); -} #endif +} void MainWindow::openFollowStreamDialog(follow_type_t type) { FollowStreamDialog *fsd = new FollowStreamDialog(*this, capture_file_, type); |