Mercurial > pidgin.yaz
changeset 7905:1d0bc32f8038
[gaim-migrate @ 8565]
This should be sufficient for a working label field type.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 21 Dec 2003 09:04:43 +0000 |
parents | 9b478c6e0bfa |
children | d3f2aa8de5bf |
files | src/gtkrequest.c src/request.c src/request.h |
diffstat | 3 files changed, 35 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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,
--- 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 *
--- 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 */