Mercurial > pidgin.yaz
changeset 14066:29f03c8fba4a
[gaim-migrate @ 16687]
I think this is better.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Thu, 10 Aug 2006 18:18:17 +0000 |
parents | 8ef994bacf3d |
children | f3ed5f4efcae |
files | src/request.c src/request.h |
diffstat | 2 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/request.c Thu Aug 10 15:44:43 2006 +0000 +++ b/src/request.c Thu Aug 10 18:18:17 2006 +0000 @@ -865,9 +865,9 @@ } void -gaim_request_field_list_set_selected(GaimRequestField *field, GList *items) +gaim_request_field_list_set_selected(GaimRequestField *field, const GList *items) { - GList *l; + const GList *l; g_return_if_fail(field != NULL); g_return_if_fail(items != NULL); @@ -876,7 +876,7 @@ gaim_request_field_list_clear_selected(field); if (!gaim_request_field_list_get_multi_select(field) && - g_list_length(items) > 1) + g_list_length((GList*)items) > 1) { gaim_debug_warning("request", "More than one item added to non-multi-select " @@ -885,10 +885,10 @@ return; } - field->u.list.selected = items; - - for (l = field->u.list.selected; l != NULL; l = l->next) + for (l = items; l != NULL; l = l->next) { + field->u.list.selected = g_list_append(field->u.list.selected, + g_strdup(l->data)); g_hash_table_insert(field->u.list.selected_table, g_strdup((char *)l->data), NULL); }
--- a/src/request.h Thu Aug 10 15:44:43 2006 +0000 +++ b/src/request.h Thu Aug 10 18:18:17 2006 +0000 @@ -909,7 +909,7 @@ * @param items The list of selected items. */ void gaim_request_field_list_set_selected(GaimRequestField *field, - GList *items); + const GList *items); /** * Returns whether or not a particular item is selected in a list field.