aboutsummaryrefslogtreecommitdiffstats
path: root/epan/prefs.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-07-07 02:49:17 +0000
committerGuy Harris <guy@alum.mit.edu>2012-07-07 02:49:17 +0000
commitef825ec6d3e07e97a85d52e116338c08c2637432 (patch)
treecb1d949c934f89e5797b5aeacc3e120bf81b10aa /epan/prefs.c
parentf0ebe6a0750a6772f7ece97e13fe749099784048 (diff)
Only one place is needed for creating preference panes; this clears up
some warnings from GTK+. For interior nodes in the preference module tree, we create a page even if the module itself has no preferences, so there's *something* we can show if the user clicks on it. (Showing the top-level protocols page is a bit weird, and requires us to keep track of it.) svn path=/trunk/; revision=43596
Diffstat (limited to 'epan/prefs.c')
-rw-r--r--epan/prefs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/epan/prefs.c b/epan/prefs.c
index 2ea33a275e..bfbcad9c14 100644
--- a/epan/prefs.c
+++ b/epan/prefs.c
@@ -376,8 +376,12 @@ prefs_register_protocol_subtree(const char *subtree, int id, void (*apply_cb)(vo
*sep++ = '\0';
if(!(new_module = find_subtree(subtree_module, ptr))) {
- /* create it */
- new_module = prefs_register_subtree(subtree_module, ptr, NULL);
+ /*
+ * There's no such module; create it, with the description
+ * being the name (if it's later registered explicitly
+ * with a description, that will override it).
+ */
+ new_module = prefs_register_subtree(subtree_module, ptr, ptr);
}
subtree_module = new_module;