# HG changeset patch # User Christian Hammond # Date 1071993666 0 # Node ID 7b64108b8ae31ccbf381cc15c5412165aeef1d77 # Parent 9c0ea21997a96d816e1558760c843267795a7ecd [gaim-migrate @ 8559] I forgot to allow for the setting/retrieval of multiple selection in a list. There we go. committer: Tailor Script diff -r 9c0ea21997a9 -r 7b64108b8ae3 src/request.c --- a/src/request.c Sun Dec 21 07:52:26 2003 +0000 +++ b/src/request.c Sun Dec 21 08:01:06 2003 +0000 @@ -663,6 +663,25 @@ } void +gaim_request_field_list_set_multi_select(GaimRequestField *field, + gboolean multi_select) +{ + g_return_if_fail(field != NULL); + g_return_if_fail(field->type == GAIM_REQUEST_FIELD_LIST); + + field->u.list.multiple_selection = multi_select; +} + +gboolean +gaim_request_field_list_get_multi_select(const GaimRequestField *field) +{ + g_return_val_if_fail(field != NULL, FALSE); + g_return_val_if_fail(field->type == GAIM_REQUEST_FIELD_LIST, FALSE); + + return field->u.list.multiple_selection; +} + +void gaim_request_field_list_add(GaimRequestField *field, const char *item) { g_return_if_fail(field != NULL); diff -r 9c0ea21997a9 -r 7b64108b8ae3 src/request.h --- a/src/request.h Sun Dec 21 07:52:26 2003 +0000 +++ b/src/request.h Sun Dec 21 08:01:06 2003 +0000 @@ -705,6 +705,26 @@ void gaim_request_field_list_set_items(GaimRequestField *field, GList *items); /** + * Sets whether or not a list field allows multiple selection. + * + * @param field The list field. + * @param multi_select TRUE if multiple selection is enabled, + * or FALSE otherwise. + */ +void gaim_request_field_list_set_multi_select(GaimRequestField *field, + gboolean multi_select); + +/** + * Returns whether or not a list field allows multiple selection. + * + * @param field The list field. + * + * @return TRUE if multiple selection is enabled, or FALSE otherwise. + */ +gboolean gaim_request_field_list_get_multi_select( + const GaimRequestField *field); + +/** * Adds an item to a list field. * * @param field The list field.