Mercurial > pidgin
diff libpurple/request.c @ 32555:ca8b2ec198d9
Add a function for prompting about a certificate. This is basically
a small wrapper around the request field API.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sun, 26 Feb 2012 04:37:10 +0000 |
parents | c3eaa2a6aa42 |
children |
line wrap: on
line diff
--- a/libpurple/request.c Sun Feb 26 03:54:26 2012 +0000 +++ b/libpurple/request.c Sun Feb 26 04:37:10 2012 +0000 @@ -1666,6 +1666,29 @@ return NULL; } +void * +purple_request_certificate(void *handle, const char *title, + const char *primary, const char *secondary, + PurpleCertificate *cert, + const char *ok_text, GCallback ok_cb, + const char *cancel_text, GCallback cancel_cb, + void *user_data) +{ + PurpleRequestFields *fields; + PurpleRequestFieldGroup *group; + PurpleRequestField *field; + + fields = purple_request_fields_new(); + group = purple_request_field_group_new(NULL); + purple_request_fields_add_group(fields, group); + field = purple_request_field_certificate_new("certificate", "Certificate", cert); + purple_request_field_group_add_field(group, field); + + return purple_request_fields(handle, title, primary, secondary, fields, + ok_text, ok_cb, cancel_text, cancel_cb, + NULL, NULL, NULL, user_data); +} + static void purple_request_close_info(PurpleRequestInfo *info) {