# HG changeset patch # User Christian Hammond # Date 1071997483 0 # Node ID 1d0bc32f8038cb9630e10a8c39d0f7dc1d4ac9e6 # Parent 9b478c6e0bfa2c18e21ae7981008d196ad0a31f4 [gaim-migrate @ 8565] This should be sufficient for a working label field type. committer: Tailor Script diff -r 9b478c6e0bfa -r 1d0bc32f8038 src/gtkrequest.c --- a/src/gtkrequest.c Sun Dec 21 08:57:56 2003 +0000 +++ b/src/gtkrequest.c Sun Dec 21 09:04:43 2003 +0000 @@ -854,8 +854,9 @@ gtk_size_group_add_widget(sg, label); - if (type == GAIM_REQUEST_FIELD_STRING && - gaim_request_field_string_is_multiline(field)) + if (type == GAIM_REQUEST_FIELD_LABEL || + (type == GAIM_REQUEST_FIELD_STRING && + gaim_request_field_string_is_multiline(field))) { gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 2 * cols, diff -r 9b478c6e0bfa -r 1d0bc32f8038 src/request.c --- a/src/request.c Sun Dec 21 08:57:56 2003 +0000 +++ b/src/request.c Sun Dec 21 09:04:43 2003 +0000 @@ -762,6 +762,19 @@ return field->u.list.items; } +GaimRequestField * +gaim_request_field_label_new(const char *id, const char *text) +{ + GaimRequestField *field; + + g_return_val_if_fail(id != NULL, NULL); + g_return_val_if_fail(text != NULL, NULL); + + field = gaim_request_field_new(id, text, GAIM_REQUEST_FIELD_LABEL); + + return field; +} + /* -- */ void * diff -r 9b478c6e0bfa -r 1d0bc32f8038 src/request.h --- a/src/request.h Sun Dec 21 08:57:56 2003 +0000 +++ b/src/request.h Sun Dec 21 09:04:43 2003 +0000 @@ -49,7 +49,8 @@ GAIM_REQUEST_FIELD_INTEGER, GAIM_REQUEST_FIELD_BOOLEAN, GAIM_REQUEST_FIELD_CHOICE, - GAIM_REQUEST_FIELD_LIST + GAIM_REQUEST_FIELD_LIST, + GAIM_REQUEST_FIELD_LABEL } GaimRequestFieldType; @@ -797,6 +798,23 @@ /*@}*/ +/**************************************************************************/ +/** @name Label Field API */ +/**************************************************************************/ +/*@{*/ + +/** + * Creates a label field. + * + * @param id The field ID. + * @param text The optional label of the field. + * + * @return The new field. + */ +GaimRequestField *gaim_request_field_label_new(const char *id, + const char *text); + +/*@}*/ /**************************************************************************/ /** @name Request API */