diff options
author | Laurent Deniel <laurent.deniel@free.fr> | 2000-08-15 20:46:17 +0000 |
---|---|---|
committer | Laurent Deniel <laurent.deniel@free.fr> | 2000-08-15 20:46:17 +0000 |
commit | 5a326952de614babcc92c18e67b59163cf461c86 (patch) | |
tree | b7340524701171866d557fe002b8aa60a5233d57 /prefs.c | |
parent | e784cb0c0fc7141d9fb4117a8e658467caa5de31 (diff) | |
download | wireshark-5a326952de614babcc92c18e67b59163cf461c86.tar.gz wireshark-5a326952de614babcc92c18e67b59163cf461c86.tar.bz2 wireshark-5a326952de614babcc92c18e67b59163cf461c86.zip |
Implements the "Properties" menu item which displays the preferences window
at the correct notebook page when a particular protocol (which has registered
some preferences) is selected in the tree view.
- add set_menus_for_selected_tree_row() in menu.[ch]
- add prefs_is_registered_protocol() and
prefs_get_title_by_name() in prefs.[ch]
svn path=/trunk/; revision=2275
Diffstat (limited to 'prefs.c')
-rw-r--r-- | prefs.c | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* prefs.c * Routines for handling preferences * - * $Id: prefs.c,v 1.34 2000/08/11 13:34:44 deniel Exp $ + * $Id: prefs.c,v 1.35 2000/08/15 20:42:09 deniel Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -229,6 +229,25 @@ find_preference(module_t *module, char *name) } /* + * Returns TRUE if the given protocol has registered preferences + */ +gboolean +prefs_is_registered_protocol(char *name) +{ + return (find_module(name) != NULL); +} + +/* + * Returns the module title of a registered protocol + */ +char * +prefs_get_title_by_name(char *name) +{ + module_t *m = find_module(name); + return (m) ? m->title : NULL; +} + +/* * Register a preference with an unsigned integral value. */ void |