diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2015-12-03 10:22:23 +0100 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2015-12-03 14:58:58 +0000 |
commit | d7ddebbfb23f39593b1c7686d1f2802c416d17f4 (patch) | |
tree | 9f0b6cfc375bd3e20b6f0fabcc2c3589faaac2a2 /ui/qt/main_window_slots.cpp | |
parent | 28bb60fd485615e19b631411ce9706050359d76f (diff) | |
download | wireshark-d7ddebbfb23f39593b1c7686d1f2802c416d17f4.tar.gz |
Qt: Update menus with new recent settings when changing profile
Update all View options to new recent settings to reflect the changes.
Also show/hide toolbars and packet panes accordingly.
Change-Id: Idb07bd5c51c01810b1f4467d2401936dc533731b
Reviewed-on: https://code.wireshark.org/review/12405
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>
Diffstat (limited to 'ui/qt/main_window_slots.cpp')
-rw-r--r-- | ui/qt/main_window_slots.cpp | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index c4992ab5c0..25f8ed7254 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -302,7 +302,11 @@ void MainWindow::layoutPanes() QVector<unsigned> new_layout = QVector<unsigned>() << prefs.gui_layout_type << prefs.gui_layout_content_1 << prefs.gui_layout_content_2 - << prefs.gui_layout_content_3; + << prefs.gui_layout_content_3 + << recent.packet_list_show + << recent.tree_view_show + << recent.byte_view_show; + if (cur_layout_ == new_layout) return; QSplitter *parents[3]; @@ -449,6 +453,11 @@ void MainWindow::layoutToolbars() } main_ui_->mainToolBar->setToolButtonStyle(tbstyle); + + main_ui_->mainToolBar->setVisible(recent.main_toolbar_show); + main_ui_->displayFilterToolBar->setVisible(recent.filter_toolbar_show); + main_ui_->wirelessToolBar->setVisible(recent.wireless_toolbar_show); + main_ui_->statusBar->setVisible(recent.statusbar_show); } void MainWindow::updatePreferenceActions() @@ -461,6 +470,31 @@ void MainWindow::updatePreferenceActions() main_ui_->actionGoAutoScroll->setChecked(prefs.capture_auto_scroll); } +void MainWindow::updateRecentActions() +{ + main_ui_->actionViewMainToolbar->setChecked(recent.main_toolbar_show); + main_ui_->actionViewFilterToolbar->setChecked(recent.filter_toolbar_show); + main_ui_->actionViewWirelessToolbar->setChecked(recent.wireless_toolbar_show); + main_ui_->actionViewStatusBar->setChecked(recent.statusbar_show); + main_ui_->actionViewPacketList->setChecked(recent.packet_list_show); + main_ui_->actionViewPacketDetails->setChecked(recent.tree_view_show); + main_ui_->actionViewPacketBytes->setChecked(recent.byte_view_show); + + foreach (QAction* tda, td_actions.keys()) { + if (recent.gui_time_format == td_actions[tda]) { + tda->setChecked(true); + } + } + foreach (QAction* tpa, tp_actions.keys()) { + if (recent.gui_time_precision == tp_actions[tpa]) { + tpa->setChecked(true); + } + } + main_ui_->actionViewTimeDisplaySecondsWithHoursAndMinutes->setChecked(recent.gui_seconds_format == TS_SECONDS_HOUR_MIN_SEC); + + main_ui_->actionViewColorizePacketList->setChecked(recent.packet_list_colorize); +} + void MainWindow::filterAction(QString &action_filter, FilterAction::Action action, FilterAction::ActionType type) { QString cur_filter, new_filter; |