Mercurial > pidgin
changeset 5809:0a661f6d65e3
[gaim-migrate @ 6239]
Added a function for getting a list of labels in a choice entry field.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 08 Jun 2003 07:24:17 +0000 |
parents | 133e86584f4b |
children | 327bc2f78340 |
files | src/request.c src/request.h |
diffstat | 2 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/request.c Sun Jun 08 04:11:39 2003 +0000 +++ b/src/request.c Sun Jun 08 07:24:17 2003 +0000 @@ -567,6 +567,15 @@ return field->u.choice.value; } +GList * +gaim_request_field_choice_get_labels(const GaimRequestField *field) +{ + g_return_val_if_fail(field != NULL, NULL); + g_return_val_if_fail(field->type == GAIM_REQUEST_FIELD_CHOICE, NULL); + + return field->u.choice->labels; +} + /* -- */ void *
--- a/src/request.h Sun Jun 08 04:11:39 2003 +0000 +++ b/src/request.h Sun Jun 08 07:24:17 2003 +0000 @@ -97,6 +97,8 @@ } u; + void *ui_data; + } GaimRequestField; /** @@ -611,6 +613,15 @@ */ int gaim_request_field_choice_get_value(const GaimRequestField *field); +/** + * Returns a list of labels in a choice field. + * + * @param field The field. + * + * @return The list of labels. + */ +GList *gaim_request_field_choice_get_labels(const GaimRequestField *field); + /*@}*/ /**************************************************************************/