diff options
-rw-r--r-- | epan/expert.c | 6 | ||||
-rw-r--r-- | ui/qt/models/pref_models.cpp | 8 | ||||
-rw-r--r-- | ui/qt/protocol_preferences_menu.cpp | 8 |
3 files changed, 12 insertions, 10 deletions
diff --git a/epan/expert.c b/epan/expert.c index 6ca5c31047..6f2a71761c 100644 --- a/epan/expert.c +++ b/epan/expert.c @@ -20,6 +20,7 @@ #include "expert.h" #include "uat.h" #include "prefs.h" +#include <epan/prefs-int.h> #include <epan/wmem_scopes.h> #include "tap.h" @@ -221,6 +222,11 @@ expert_packet_init(void) proto_set_cant_toggle(proto_expert); module_expert = prefs_register_protocol(proto_expert, NULL); + //Since "expert" is really a pseudo protocol, it shouldn't be + //categorized with other "real" protocols when it comes to + //preferences. Since it's just a UAT, don't bury it in + //with the other protocols + module_expert->use_gui = FALSE; expert_uat = uat_new("Expert Info Severity Level Configuration", sizeof(expert_level_entry_t), diff --git a/ui/qt/models/pref_models.cpp b/ui/qt/models/pref_models.cpp index 5649ca0b1c..7f9c92ddea 100644 --- a/ui/qt/models/pref_models.cpp +++ b/ui/qt/models/pref_models.cpp @@ -283,14 +283,6 @@ fill_prefs(module_t *module, gpointer root_ptr) void PrefsModel::populate() { - //Since "expert" is really a pseudo protocol, it shouldn't be - //categorized with other "real" protocols when it comes to - //preferences. Since it's just a UAT, don't bury it in - //with the other protocols - module_t *expert_module = prefs_find_module("_ws.expert"); - if (expert_module) - expert_module->use_gui = FALSE; - prefs_modules_foreach_submodules(NULL, fill_prefs, (gpointer)root_); //Add the "specially handled" preferences diff --git a/ui/qt/protocol_preferences_menu.cpp b/ui/qt/protocol_preferences_menu.cpp index 7a4baddf83..14c2ddbe88 100644 --- a/ui/qt/protocol_preferences_menu.cpp +++ b/ui/qt/protocol_preferences_menu.cpp @@ -189,8 +189,12 @@ void ProtocolPreferencesMenu::setModule(const QString module_name) module_name_ = module_name; action = addAction(tr("Open %1 preferences…").arg(long_name)); - action->setData(QString(module_name)); - connect(action, SIGNAL(triggered(bool)), this, SLOT(modulePreferencesTriggered())); + if (module_->use_gui) { + action->setData(QString(module_name)); + connect(action, SIGNAL(triggered(bool)), this, SLOT(modulePreferencesTriggered())); + } else { + action->setDisabled(true); + } addSeparator(); prefs_pref_foreach(module_, add_prefs_menu_item, this); |