aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-08-28 14:03:34 -0700
committerGerald Combs <gerald@wireshark.org>2015-08-28 22:55:34 +0000
commit579365ef7e266f65a61d25b0bc736a6b37463386 (patch)
tree5b6a4457fe723e61e01aa3b97222f14b3b202ffc /ui
parent4d71ae7df77e4848b29d0694ef255bfd96869b90 (diff)
Disable most of the main window while we're tapping.
Our event loop is nested when we read packets. Disable the main window's central widget while we're retapping packets in order to minimize the chance of ending up in an unexpected state while analyzing packets. Note that we will probably want to disable more of the main window and do so in other parts of the code. Change-Id: I68a00fe43d2ac9e7c0749751abd1c10c47155b3b Reviewed-on: https://code.wireshark.org/review/10293 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/main_window_slots.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp
index 9d120b3095..cd9ab08b2f 100644
--- a/ui/qt/main_window_slots.cpp
+++ b/ui/qt/main_window_slots.cpp
@@ -677,17 +677,27 @@ void MainWindow::captureFileReadFinished() {
emit setDissectedCaptureFile(capture_file_.capFile());
}
+// Our event loop becomes nested whenever we call update_progress_dlg, which
+// includes several places in file.c. The GTK+ UI stays out of trouble by
+// showing a modal progress dialog. We attempt to do the equivalent below by
+// disabling parts of the main window. At a minumum the ProgressFrame in the
+// main status bar must remain accessible.
+//
+// We might want to do this any time the main status bar progress frame is
+// shown and hidden.
void MainWindow::captureFileRetapStarted()
{
// XXX Push a status message?
main_ui_->actionFileClose->setEnabled(false);
main_ui_->actionViewReload->setEnabled(false);
+ main_ui_->centralWidget->setEnabled(false);
}
void MainWindow::captureFileRetapFinished()
{
main_ui_->actionFileClose->setEnabled(true);
main_ui_->actionViewReload->setEnabled(true);
+ main_ui_->centralWidget->setEnabled(true);
}
void MainWindow::captureFileClosing() {