aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/main_window.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-11-10 10:12:56 -0800
committerGerald Combs <gerald@wireshark.org>2015-11-11 05:28:10 +0000
commit757fe65474a37d94e7eba1b6b4bb6df23b69ba56 (patch)
treecce4a05729720c2903b06cfe6abd3b30b1d456a8 /ui/qt/main_window.h
parent8930b0d5e0e5827f7cd72b9cb765e09bad0c3765 (diff)
Qt: Freeze+thaw the main window during nested operations.
As noted in main_window.cpp: // 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. Move the freeze+thaw code from captureFileRetapStarted and captureFileRetapFinished to its own set of member functions. Call them when we {,un}mark and {,un}ignore packets and note that we should probably call them elsewhere. Disable mark and ignore actions when we freeze and restore their states when we thaw. Bug: 11681 Change-Id: I6f015f7f5f6c98cd48ace2c87f43f48efe51a88b Reviewed-on: https://code.wireshark.org/review/11690 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/qt/main_window.h')
-rw-r--r--ui/qt/main_window.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/qt/main_window.h b/ui/qt/main_window.h
index 2fbf527c73..9c0a161247 100644
--- a/ui/qt/main_window.h
+++ b/ui/qt/main_window.h
@@ -140,6 +140,8 @@ private:
QActionGroup *time_display_actions_;
QActionGroup *time_precision_actions_;
FunnelStatistics *funnel_statistics_;
+ QList<QPair<QAction *, bool> > freeze_actions_;
+ QWidget *freeze_focus_;
bool capture_stopping_;
bool capture_filter_valid_;
@@ -161,6 +163,9 @@ private:
QWidget* getLayoutWidget(layout_pane_content_e type);
+ void freeze();
+ void thaw();
+
void mergeCaptureFile();
void importCaptureFile();
void saveCaptureFile(capture_file *cf, bool dont_reopen);
@@ -176,6 +181,7 @@ private:
void initShowHideMainWidgets();
void initTimeDisplayFormatMenu();
void initTimePrecisionFormatMenu();
+ void initFreezeActions();
void setTitlebarForSelectedTreeRow();
void setTitlebarForCaptureFile();