Sun, 08 Jun 2003 07:24:17 +0000
[gaim-migrate @ 6239]
Added a function for getting a list of labels in a choice entry field.
| src/request.c | file | annotate | diff | comparison | revisions | |
| src/request.h | file | annotate | diff | comparison | revisions |
--- 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); + /*@}*/ /**************************************************************************/