summaryrefslogtreecommitdiff
path: root/libpurple/prefs.c
diff options
context:
space:
mode:
authorSadrul Habib Chowdhury <sadrul@pidgin.im>2007-07-11 19:44:32 +0000
committerSadrul Habib Chowdhury <sadrul@pidgin.im>2007-07-11 19:44:32 +0000
commit944c43dc33d6157de56c5ec921d406ac70990cea (patch)
treed52e769b22ea413d3e024fd0346f3291ef8088d7 /libpurple/prefs.c
parent514c95a6dae2d1a24fe5e7d46fc1755d91fa619a (diff)
downloadpidgin-944c43dc33d6157de56c5ec921d406ac70990cea.tar.gz
Update the way _get_children_names is used.
applied changes from afa84ce2e5e448ce3233a9effb3136e1e23fb969 through d7c71ed89067d861b85108f04ea056f23320d33d
Diffstat (limited to 'libpurple/prefs.c')
-rw-r--r--libpurple/prefs.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libpurple/prefs.c b/libpurple/prefs.c
index 1945a4f982..212adf32da 100644
--- a/libpurple/prefs.c
+++ b/libpurple/prefs.c
@@ -1325,6 +1325,24 @@ purple_prefs_disconnect_by_handle(void *handle)
disco_callback_helper_handle(&prefs, handle);
}
+GList *
+purple_prefs_get_children_names(const char *name)
+{
+ GList * list = NULL;
+ struct purple_pref *pref = find_pref(name), *child;
+ char sep[2] = "\0\0";;
+
+ if (pref == NULL)
+ return NULL;
+
+ if (name[strlen(name) - 1] != '/')
+ sep[0] = '/';
+ for (child = pref->first_child; child; child = child->sibling) {
+ list = g_list_append(list, g_strdup_printf("%s%s%s", name, sep, child->name));
+ }
+ return list;
+}
+
void
purple_prefs_update_old()
{