aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/preferences_dialog.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2013-01-18 00:50:14 +0000
committerGerald Combs <gerald@wireshark.org>2013-01-18 00:50:14 +0000
commitae7ee61e842f46d0e7a7a4dc64c848866a6d7afb (patch)
tree6e483f057cb06bc3c9a8ee68a6211bd4be557f6a /ui/qt/preferences_dialog.h
parent7a9095ee15c9ef012f3c8fd77c8f8cd06bdaa37b (diff)
Rename the "saved_val" preference element to "stashed_val" in order to
more clearly indicate that it's a copy of a preference value rather than something we've saved in the preferences file. Update prefs_pref_to_str() to handle default, stashed, and current prefs. Create ui/preference_utils.[ch] and move some common routines there. Use prefs_pref_type_name() in the GTK+ preferences dialog. Make the "OK" button in the Qt preferences dialog work. We simply write the prefs and redissect on "OK" and do nothing on "Cancel". This is intentionally different from the Apply/OK/Cancel behavior in the GTK+ version. Add a general "emitAppSignal" method to wsApp and use it for packet dissection and preference changes. Suggest that we might want to create a WsString class to make conversion between QStrings, gchar *s, and GStrings easier. svn path=/trunk/; revision=47139
Diffstat (limited to 'ui/qt/preferences_dialog.h')
-rw-r--r--ui/qt/preferences_dialog.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/qt/preferences_dialog.h b/ui/qt/preferences_dialog.h
index b00b60d4a1..4654146db0 100644
--- a/ui/qt/preferences_dialog.h
+++ b/ui/qt/preferences_dialog.h
@@ -54,6 +54,7 @@ protected:
void keyPressEvent(QKeyEvent *evt);
private:
+ bool stashedPrefIsDefault(pref_t *pref);
void updateItem(QTreeWidgetItem &item);
Ui::PreferencesDialog *pd_ui_;
@@ -62,7 +63,6 @@ private:
QString saved_string_pref_;
QComboBox *cur_combo_box_;
int saved_combo_idx_;
-// QHash<pref_t *, QTreeWidgetItem *> pref_item_hash_;
private slots:
void on_prefsTree_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
@@ -75,8 +75,11 @@ private slots:
void stringPrefEditingFinished();
void rangePrefTextChanged(const QString & text);
void rangePrefEditingFinished();
- void on_buttonBox_helpRequested();
+
void on_advancedTree_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
+
+ void on_buttonBox_accepted();
+ void on_buttonBox_helpRequested();
};
#endif // PREFERENCES_DIALOG_H