diff options
author | Gerald Combs <gerald@wireshark.org> | 2013-01-18 00:50:14 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2013-01-18 00:50:14 +0000 |
commit | ae7ee61e842f46d0e7a7a4dc64c848866a6d7afb (patch) | |
tree | 6e483f057cb06bc3c9a8ee68a6211bd4be557f6a /ui/qt/wireshark_application.cpp | |
parent | 7a9095ee15c9ef012f3c8fd77c8f8cd06bdaa37b (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/wireshark_application.cpp')
-rw-r--r-- | ui/qt/wireshark_application.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/ui/qt/wireshark_application.cpp b/ui/qt/wireshark_application.cpp index 6dd3e93f11..9f00ff9b02 100644 --- a/ui/qt/wireshark_application.cpp +++ b/ui/qt/wireshark_application.cpp @@ -523,6 +523,20 @@ void WiresharkApplication::registerUpdate(register_action_e action, const char * emit splashUpdate(action, message); } +void WiresharkApplication::emitAppSignal(AppSignal signal) +{ + switch (signal) { + case PreferencesChanged: + emit preferencesChanged(); + break; + case PacketDissectionChanged: + emit packetDissectionChanged(); + break; + default: + break; + } +} + void WiresharkApplication::allSystemsGo() { initialized_ = true; @@ -533,12 +547,6 @@ void WiresharkApplication::allSystemsGo() } } -void WiresharkApplication::applyAllPreferences() -{ - prefs_apply_all(); - emit updatePreferences(); -} - e_prefs * WiresharkApplication::readConfigurationFiles(char **gdp_path, char **dp_path) { int gpf_open_errno, gpf_read_errno; |