diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2018-09-01 14:05:46 +0200 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2018-09-02 18:36:25 +0000 |
commit | 5af98d9be5c7c41c36d8723bc8a4a449cd593a05 (patch) | |
tree | 0064806988d6c8123316c1f8d875e36af7e480cb /ui | |
parent | cb002c597a4e4635b1743cb178301dc46b7d01de (diff) |
prefs: Remove prefs.gui_use_pref_save
This setting was only used in GTK.
Change-Id: If184c61e4e081992e517f480b4faf129b81508c1
Reviewed-on: https://code.wireshark.org/review/29388
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/capture_interfaces_dialog.cpp | 4 | ||||
-rw-r--r-- | ui/qt/column_editor_frame.cpp | 4 | ||||
-rw-r--r-- | ui/qt/enabled_protocols_dialog.cpp | 7 | ||||
-rw-r--r-- | ui/qt/enabled_protocols_dialog.ui | 2 | ||||
-rw-r--r-- | ui/qt/packet_list.cpp | 20 | ||||
-rw-r--r-- | ui/qt/preference_editor_frame.cpp | 15 | ||||
-rw-r--r-- | ui/qt/protocol_preferences_menu.cpp | 8 |
7 files changed, 17 insertions, 43 deletions
diff --git a/ui/qt/capture_interfaces_dialog.cpp b/ui/qt/capture_interfaces_dialog.cpp index 2183727f62..0bef6cba84 100644 --- a/ui/qt/capture_interfaces_dialog.cpp +++ b/ui/qt/capture_interfaces_dialog.cpp @@ -1056,9 +1056,7 @@ bool CaptureInterfacesDialog::saveOptionsToPreferences() #endif } } - if (!prefs.gui_use_pref_save) { - prefs_main_write(); - } + prefs_main_write(); return true; } diff --git a/ui/qt/column_editor_frame.cpp b/ui/qt/column_editor_frame.cpp index cf9e9a79d9..82b7a0b7ca 100644 --- a/ui/qt/column_editor_frame.cpp +++ b/ui/qt/column_editor_frame.cpp @@ -146,9 +146,7 @@ void ColumnEditorFrame::on_buttonBox_accepted() set_column_custom_occurrence(cur_column_, ui->occurrenceLineEdit->text().toInt()); } } - if (!prefs.gui_use_pref_save) { - prefs_main_write(); - } + prefs_main_write(); emit columnEdited(); } diff --git a/ui/qt/enabled_protocols_dialog.cpp b/ui/qt/enabled_protocols_dialog.cpp index 97c7578b25..c9437bce9e 100644 --- a/ui/qt/enabled_protocols_dialog.cpp +++ b/ui/qt/enabled_protocols_dialog.cpp @@ -35,10 +35,6 @@ EnabledProtocolsDialog::EnabledProtocolsDialog(QWidget *parent) : int one_em = ui->protocol_tree_->fontMetrics().height(); ui->protocol_tree_->setColumnWidth(EnabledProtocolsModel::colProtocol, one_em * 18); - //"Remove" Save button - if (!prefs.gui_use_pref_save) - ui->buttonBox->button(QDialogButtonBox::Save)->setHidden(true); - QTimer::singleShot(0, this, SLOT(fillTree())); } @@ -92,8 +88,7 @@ void EnabledProtocolsDialog::on_buttonBox_clicked(QAbstractButton *button) { if (button == ui->buttonBox->button(QDialogButtonBox::Apply)) { - // if we don't have a Save button, just save the settings now - applyChanges(!prefs.gui_use_pref_save); + applyChanges(TRUE); } } #endif diff --git a/ui/qt/enabled_protocols_dialog.ui b/ui/qt/enabled_protocols_dialog.ui index 2e9cfc1e3c..8b2ca7ce50 100644 --- a/ui/qt/enabled_protocols_dialog.ui +++ b/ui/qt/enabled_protocols_dialog.ui @@ -85,7 +85,7 @@ <enum>Qt::Horizontal</enum> </property> <property name="standardButtons"> - <set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok|QDialogButtonBox::Save</set> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set> </property> </widget> </item> diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp index 74b657262a..070b2d4a37 100644 --- a/ui/qt/packet_list.cpp +++ b/ui/qt/packet_list.cpp @@ -1444,9 +1444,7 @@ void PacketList::headerMenuTriggered() case caResolveNames: set_column_resolved(header_ctx_column_, checked); packet_list_model_->resetColumns(); - if (!prefs.gui_use_pref_save) { - prefs_main_write(); - } + prefs_main_write(); redraw = true; break; case caResizeToContents: @@ -1458,18 +1456,14 @@ void PacketList::headerMenuTriggered() case caHideColumn: set_column_visible(header_ctx_column_, FALSE); hideColumn(header_ctx_column_); - if (!prefs.gui_use_pref_save) { - prefs_main_write(); - } + prefs_main_write(); break; case caRemoveColumn: { if (header()->count() > 2) { column_prefs_remove_nth(header_ctx_column_); columnsChanged(); - if (!prefs.gui_use_pref_save) { - prefs_main_write(); - } + prefs_main_write(); } break; } @@ -1495,9 +1489,7 @@ void PacketList::columnVisibilityTriggered() if (ha->isChecked()) { setRecentColumnWidth(col); } - if (!prefs.gui_use_pref_save) { - prefs_main_write(); - } + prefs_main_write(); } void PacketList::sectionResized(int col, int, int new_width) @@ -1574,9 +1566,7 @@ void PacketList::sectionMoved(int logicalIndex, int oldVisualIndex, int newVisua header()->resizeSection(i, saved_sizes[i]); } - if (!prefs.gui_use_pref_save) { - prefs_main_write(); - } + prefs_main_write(); wsApp->emitAppSignal(WiresharkApplication::ColumnsChanged); diff --git a/ui/qt/preference_editor_frame.cpp b/ui/qt/preference_editor_frame.cpp index d3bea708ab..30a230298c 100644 --- a/ui/qt/preference_editor_frame.cpp +++ b/ui/qt/preference_editor_frame.cpp @@ -207,16 +207,13 @@ void PreferenceEditorFrame::on_buttonBox_accepted() pref_unstash(pref_, &unstashed_data); prefs_apply(module_); - if (!prefs.gui_use_pref_save) { - gchar* err = NULL; + prefs_main_write(); - prefs_main_write(); - - if (save_decode_as_entries(&err) < 0) - { - simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err); - g_free(err); - } + gchar* err = NULL; + if (save_decode_as_entries(&err) < 0) + { + simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err); + g_free(err); } } on_buttonBox_rejected(); diff --git a/ui/qt/protocol_preferences_menu.cpp b/ui/qt/protocol_preferences_menu.cpp index e64080b6a2..06b03bb3be 100644 --- a/ui/qt/protocol_preferences_menu.cpp +++ b/ui/qt/protocol_preferences_menu.cpp @@ -276,9 +276,7 @@ void ProtocolPreferencesMenu::boolPreferenceTriggered() module_->prefs_changed_flags |= bpa->setBoolValue(); prefs_apply(module_); - if (!prefs.gui_use_pref_save) { - prefs_main_write(); - } + prefs_main_write(); /* Protocol preference changes almost always affect dissection, so don't bother checking flags */ @@ -294,9 +292,7 @@ void ProtocolPreferencesMenu::enumPreferenceTriggered() if (changed_flags) { // Changed module_->prefs_changed_flags |= changed_flags; prefs_apply(module_); - if (!prefs.gui_use_pref_save) { - prefs_main_write(); - } + prefs_main_write(); /* Protocol preference changes almost always affect dissection, so don't bother checking flags */ |