Mercurial > pidgin
diff finch/gntrequest.c @ 32554:03dcb0185c82
Display a certificate request field in Pidgin and Finch by just using
the display string of the certificate in a label.
| author | Elliott Sales de Andrade <qulogic@pidgin.im> |
|---|---|
| date | Sun, 26 Feb 2012 03:54:26 +0000 |
| parents | ecfbb3ba0135 |
| children |
line wrap: on
line diff
--- a/finch/gntrequest.c Sun Feb 26 03:38:28 2012 +0000 +++ b/finch/gntrequest.c Sun Feb 26 03:54:26 2012 +0000 @@ -571,6 +571,22 @@ return combo; } +static GntWidget* +create_certificate_field(PurpleRequestField *field) +{ + GntWidget *w; + PurpleCertificate *cert; + char *str; + + cert = purple_request_field_certificate_get_value(field); + str = purple_certificate_get_display_string(cert); + w = gnt_label_new(str); + + g_free(str); + + return w; +} + static void * finch_request_fields(const char *title, const char *primary, const char *secondary, PurpleRequestFields *allfields, @@ -650,6 +666,10 @@ accountlist = create_account_field(field); purple_request_field_set_ui_data(field, accountlist); } + else if (type == PURPLE_REQUEST_FIELD_CERTIFICATE) + { + purple_request_field_set_ui_data(field, create_certificate_field(field)); + } else { purple_request_field_set_ui_data(field, gnt_label_new_with_format(_("Not implemented yet."),
