forked from osmocom/wireshark
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>
This commit is contained in:
parent
4d71ae7df7
commit
579365ef7e
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue