Mercurial > pidgin
changeset 18477:8af9ebae439c
Add purple_prefs_get_children_names in purple. And update Changelog.API
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Wed, 11 Jul 2007 18:37:54 +0000 |
parents | 400f322a4da9 |
children | c583fb84c339 |
files | ChangeLog.API libpurple/prefs.c libpurple/prefs.h |
diffstat | 3 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog.API Wed Jul 11 17:45:41 2007 +0000 +++ b/ChangeLog.API Wed Jul 11 18:37:54 2007 +0000 @@ -28,6 +28,7 @@ longer than 1 second away. Be aware of the rounding, though. * purple_xfer_get_remote_user * purple_pounces_get_all_for_ui + * purple_prefs_get_children_names Changed: * The documentation of the following functions now properly @@ -104,6 +105,8 @@ * gnt_window_present * gnt_tree_set_column_width_ratio * gnt_tree_set_column_resizable + * gnt_tree_set_column_is_right_aligned + * 'file-selected' signal is emited for GntFileSel Changed: * gnt_tree_get_rows() now returns a GList* instead of a const
--- a/libpurple/prefs.c Wed Jul 11 17:45:41 2007 +0000 +++ b/libpurple/prefs.c Wed Jul 11 18:37:54 2007 +0000 @@ -1325,6 +1325,22 @@ 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; + + if (pref == NULL) + return NULL; + + for (child = pref->first_child; child; child = child->sibling) { + list = g_list_append(list, g_strdup(child->name)); + } + return list; + +} + void purple_prefs_update_old() {
--- a/libpurple/prefs.h Wed Jul 11 17:45:41 2007 +0000 +++ b/libpurple/prefs.h Wed Jul 11 18:37:54 2007 +0000 @@ -281,6 +281,15 @@ */ GList *purple_prefs_get_path_list(const char *name); +/* + * Returns a list of children for a pref + * + * @param name The parent pref + * @return A list of newly allocated strings denoting the names of the children. + * Returns @c NULL if there are no children or if pref doesn't exist. + * The caller must free all the strings and the list. + */ +GList *purple_prefs_get_children_names(const char *name); /** * Add a callback to a pref (and its children)