aboutsummaryrefslogtreecommitdiffstats
path: root/prefs.c
diff options
context:
space:
mode:
authorLaurent Deniel <laurent.deniel@free.fr>2000-08-15 20:46:17 +0000
committerLaurent Deniel <laurent.deniel@free.fr>2000-08-15 20:46:17 +0000
commit5a326952de614babcc92c18e67b59163cf461c86 (patch)
treeb7340524701171866d557fe002b8aa60a5233d57 /prefs.c
parente784cb0c0fc7141d9fb4117a8e658467caa5de31 (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] svn path=/trunk/; revision=2275
Diffstat (limited to 'prefs.c')
-rw-r--r--prefs.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/prefs.c b/prefs.c
index f5d85bf525..df8ad0dc93 100644
--- a/prefs.c
+++ b/prefs.c
@@ -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