forked from osmocom/wireshark
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>
This commit is contained in:
parent
8c211d51ef
commit
13297438d9
|
@ -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);
|
||||
|
|
|
@ -448,9 +448,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();
|
||||
|
|
|
@ -655,6 +655,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();
|
||||
}
|
||||
|
||||
|
@ -678,6 +680,7 @@ void MainWindow::captureFileReadFinished() {
|
|||
setForCapturedPackets(true);
|
||||
|
||||
main_ui_->statusBar->setFileName(capture_file_);
|
||||
main_ui_->actionAnalyzeReloadLuaPlugins->setEnabled(true);
|
||||
|
||||
packet_list_->captureFileReadFinished();
|
||||
|
||||
|
@ -2548,9 +2551,9 @@ void MainWindow::on_actionAnalyzeDecodeAs_triggered()
|
|||
wsApp->flushAppSignals();
|
||||
}
|
||||
|
||||
#ifdef HAVE_LUA
|
||||
void MainWindow::on_actionAnalyzeReloadLuaPlugins_triggered()
|
||||
{
|
||||
#ifdef HAVE_LUA
|
||||
if (wsApp->isReloadingLua())
|
||||
return;
|
||||
|
||||
|
@ -2573,8 +2576,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);
|
||||
|
|
Loading…
Reference in New Issue