diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-01-03 07:53:48 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-01-03 07:53:48 +0000 |
commit | 3613c121fe53a2bcd70a3004a589bc38ecc2864d (patch) | |
tree | 8b8fd854a5439a0fff7bcda55cebf9e519245b3c /prefs.c | |
parent | fee98dd94462787123ec7fa0d660044a4b1800c4 (diff) |
Add a new "prefs_register_protocol()" routine, which is like
"prefs_register_module()" except that it takes a protocol index as
returned by "proto_register_protocol()" as its first argument, rather
than taking two character strings as arguments as its first two
arguments, and uses the protocol's abbreviation as the name to use for
preferences in the preferences file and the "-o" flag and uses the
protocol's short name as the name to use in the tabs in the
"Edit->Preferences" window.
svn path=/trunk/; revision=2812
Diffstat (limited to 'prefs.c')
-rw-r--r-- | prefs.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* prefs.c * Routines for handling preferences * - * $Id: prefs.c,v 1.45 2001/01/03 06:55:35 guy Exp $ + * $Id: prefs.c,v 1.46 2001/01/03 07:53:44 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -53,6 +53,7 @@ #include "packet.h" #include "file.h" #include "prefs.h" +#include "proto.h" #include "column.h" #include "print.h" #include "util.h" @@ -114,6 +115,17 @@ prefs_register_module(const char *name, const char *title, } /* + * Register that a protocol has preferences. + */ +module_t * +prefs_register_protocol(int id, void (*apply_cb)(void)) +{ + return prefs_register_module(proto_get_protocol_filter_name(id), + proto_get_protocol_short_name(id), + apply_cb); +} + +/* * Find a module, given its name. */ static gint |