# HG changeset patch # User Ethan Blanton # Date 1061430360 0 # Node ID 4bc050b1af34d5236e0b5b1a25edb71702585620 # Parent a621e2c6c71381397f57f7919aa6780d80550788 [gaim-migrate @ 7056] Sometimes I like to know the types of my prefs. committer: Tailor Script diff -r a621e2c6c713 -r 4bc050b1af34 src/prefs.c --- a/src/prefs.c Thu Aug 21 01:44:23 2003 +0000 +++ b/src/prefs.c Thu Aug 21 01:46:00 2003 +0000 @@ -494,6 +494,15 @@ return pref->value.generic; } +GaimPrefType gaim_prefs_get_type(const char *name) { + struct gaim_pref *pref = find_pref(name); + + if (pref == NULL) + return GAIM_PREF_NONE; + + return (pref->type); +} + gboolean gaim_prefs_get_bool(const char *name) { struct gaim_pref *pref = find_pref(name); diff -r a621e2c6c713 -r 4bc050b1af34 src/prefs.h --- a/src/prefs.h Thu Aug 21 01:44:23 2003 +0000 +++ b/src/prefs.h Thu Aug 21 01:46:00 2003 +0000 @@ -152,6 +152,14 @@ void gaim_prefs_set_string_list(const char *name, GList *value); /** + * Get pref type + * + * @param name The name of the pref + * @return The type of the pref + */ +GaimPrefType gaim_prefs_get_type(const char *name); + +/** * Get boolean pref value * * @param name The name of the pref