aboutsummaryrefslogtreecommitdiffstats
path: root/epan/prefs.h
diff options
context:
space:
mode:
authorGraeme Lunt <graeme.lunt@smhs.co.uk>2007-03-19 19:08:22 +0000
committerGraeme Lunt <graeme.lunt@smhs.co.uk>2007-03-19 19:08:22 +0000
commita51f1694c9cf11a609e8de41ed35787afeefcb14 (patch)
treefcecc42132a85fe80293064ac45db03bf35e1b47 /epan/prefs.h
parent93af79c80d21515689c3eb2d573f11b63341457a (diff)
downloadwireshark-a51f1694c9cf11a609e8de41ed35787afeefcb14.tar.gz
wireshark-a51f1694c9cf11a609e8de41ed35787afeefcb14.tar.bz2
wireshark-a51f1694c9cf11a609e8de41ed35787afeefcb14.zip
This change allows a structure to be created under the "Protocols" section of the preferences.
A new function is introduced, prefs_register_protocol_subtree(), that allows the subtree the protocol should appear under to be specified. The subtree is specified as a string, with a '/' delimiting each subtree element. For example, prefs_register_protocol(proto_dap, prefs_register_dap); becomes prefs_register_protocol_subtree("OSI/X.500", proto_dap, prefs_register_dap); The function will create all the intermediate subtree nodes that are required, if they don't already exist. This allows the grouping of procotols which should make the list of protocols more manageable as even more are added. The current aim is to group by protocol family e.g. + OSI + X.400 X.411 X.420 + X.500 DISP DAP DOP DSP + X.509 X509AF X509CE ... but others grouping could be envisioned (e.g. by first letter). As the intermediate nodes may already have preferences (e.g. OSI), then modules are now allowed to have submodules. Previously each node was either a subtree or held preferences. This is consistent with the "User Interface" node. The subtree structure has no effect on how the preferences are saved to file, and the "Protocol Preferences..." menu option will bring up the preferences expanded to the correct node. In addition, a new "blank page" has been introduced for intermediate nodes that have no preferences (and is also used when the "Protocols" node itself is chosen). This prevents confusion when the user moves from a node with preferences to a node without preferences, but the page old page is still shown. There is also a change to prevent '#' characters in a value being treated as a comment when parsing the preferences file. (There is nothing that adds comments when writing the preferences file.) svn path=/trunk/; revision=21066
Diffstat (limited to 'epan/prefs.h')
-rw-r--r--epan/prefs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/epan/prefs.h b/epan/prefs.h
index 52e1adeff0..230361eea1 100644
--- a/epan/prefs.h
+++ b/epan/prefs.h
@@ -195,6 +195,14 @@ extern module_t *prefs_register_subtree(module_t *parent, const char *title,
extern module_t *prefs_register_protocol(int id, void (*apply_cb)(void));
/*
+ * Register that a protocol has preferences and group it under a single
+ * subtree
+ */
+#define PREFERENCE_GROUPING
+extern module_t *prefs_register_protocol_subtree(const char *subtree, int id,
+ void (*apply_cb)(void));
+
+/*
* Register that a protocol used to have preferences but no longer does,
* by creating an "obsolete" module for it.
*/