Mercurial > pidgin.yaz
diff libpurple/prefs.c @ 20469:9e5bb492fc18
propagate from branch 'im.pidgin.pidgin' (head d565f6901d390d091fab30d0bd923fa36c335da2)
to branch 'im.pidgin.cpw.khc.msnp14' (head aacb44d1de5f72f3c7d8d2e231432581f5c09dd7)
author | Carlos Silva <typ0@pidgin.im> |
---|---|
date | Sat, 14 Jul 2007 18:36:34 +0000 |
parents | 58d1df75c91c |
children | 9f7587b86b0d |
line wrap: on
line diff
--- a/libpurple/prefs.c Sat Jul 14 18:13:59 2007 +0000 +++ b/libpurple/prefs.c Sat Jul 14 18:36:34 2007 +0000 @@ -1325,6 +1325,25 @@ 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() {