diff options
author | deniel <deniel@f5534014-38df-0310-8fa8-9805f1628bb7> | 2000-08-15 20:46:17 +0000 |
---|---|---|
committer | deniel <deniel@f5534014-38df-0310-8fa8-9805f1628bb7> | 2000-08-15 20:46:17 +0000 |
commit | 6cc4f5819a037089c0cf4ac930e462055a3b45b2 (patch) | |
tree | b7340524701171866d557fe002b8aa60a5233d57 /prefs.c | |
parent | 2fd2112d0c94ff4241e76b51b382cf6568a5736c (diff) |
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]
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2275 f5534014-38df-0310-8fa8-9805f1628bb7
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 |