changeset 6538:4bc050b1af34

[gaim-migrate @ 7056] Sometimes I like to know the types of my prefs. committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Thu, 21 Aug 2003 01:46:00 +0000
parents a621e2c6c713
children 1690791f0c70
files src/prefs.c src/prefs.h
diffstat 2 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);
 
--- 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