From 69ccb1c49425512fd078f7d6901fbb0058c87fe9 Mon Sep 17 00:00:00 2001 From: Danielle Madeley Date: Fri, 8 Oct 2010 13:07:33 +1100 Subject: Fix Empathy to build with gcr-3 Closes https://bugzilla.gnome.org/show_bug.cgi?id=631657 --- libempathy-gtk/empathy-tls-dialog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libempathy-gtk/empathy-tls-dialog.c b/libempathy-gtk/empathy-tls-dialog.c index 39d02ff65..ae531ce37 100644 --- a/libempathy-gtk/empathy-tls-dialog.c +++ b/libempathy-gtk/empathy-tls-dialog.c @@ -216,7 +216,7 @@ reason_to_string (EmpathyTLSDialog *self) static GtkWidget * build_gcr_widget (EmpathyTLSDialog *self) { - GcrCertificateBasicsWidget *widget; + GcrCertificateWidget *widget; GcrCertificate *certificate; GPtrArray *cert_chain = NULL; GArray *first_cert; @@ -229,7 +229,7 @@ build_gcr_widget (EmpathyTLSDialog *self) certificate = gcr_simple_certificate_new ((const guchar *) first_cert->data, first_cert->len); - widget = gcr_certificate_basics_widget_new (certificate); + widget = gcr_certificate_widget_new (certificate); g_object_unref (certificate); g_ptr_array_unref (cert_chain); -- cgit v1.2.3 From 5c5bf4621619277a7a24e328f8a46ba49bb4211f Mon Sep 17 00:00:00 2001 From: Danielle Madeley Date: Mon, 11 Oct 2010 12:04:12 +1100 Subject: Remove formatting line breaks from translatable strings. Add extra line breaks. Add punctuation to translatable strings. --- libempathy-gtk/empathy-tls-dialog.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/libempathy-gtk/empathy-tls-dialog.c b/libempathy-gtk/empathy-tls-dialog.c index ae531ce37..fc198c2f5 100644 --- a/libempathy-gtk/empathy-tls-dialog.c +++ b/libempathy-gtk/empathy-tls-dialog.c @@ -148,47 +148,48 @@ reason_to_string (EmpathyTLSDialog *self) details = priv->details; g_string_append (str, _("The identity provided by the chat server cannot be " - "verified.\n")); + "verified.")); + g_string_append (str, "\n\n"); switch (reason) { case EMP_TLS_CERTIFICATE_REJECT_REASON_UNTRUSTED: reason_str = _("The certificate is not signed by a Certification " - "Authority"); + "Authority."); break; case EMP_TLS_CERTIFICATE_REJECT_REASON_EXPIRED: - reason_str = _("The certificate has expired"); + reason_str = _("The certificate has expired."); break; case EMP_TLS_CERTIFICATE_REJECT_REASON_NOT_ACTIVATED: - reason_str = _("The certificate hasn't yet been activated"); + reason_str = _("The certificate hasn't yet been activated."); break; case EMP_TLS_CERTIFICATE_REJECT_REASON_FINGERPRINT_MISMATCH: - reason_str = _("The certificate does not have the expected fingerprint"); + reason_str = _("The certificate does not have the expected fingerprint."); break; case EMP_TLS_CERTIFICATE_REJECT_REASON_HOSTNAME_MISMATCH: reason_str = _("The hostname verified by the certificate doesn't match " - "the server name"); + "the server name."); break; case EMP_TLS_CERTIFICATE_REJECT_REASON_SELF_SIGNED: - reason_str = _("The certificate is self-signed"); + reason_str = _("The certificate is self-signed."); break; case EMP_TLS_CERTIFICATE_REJECT_REASON_REVOKED: reason_str = _("The certificate has been revoked by the issuing " - "Certification Authority"); + "Certification Authority."); break; case EMP_TLS_CERTIFICATE_REJECT_REASON_INSECURE: - reason_str = _("The certificate is cryptographically weak"); + reason_str = _("The certificate is cryptographically weak."); break; case EMP_TLS_CERTIFICATE_REJECT_REASON_LIMIT_EXCEEDED: - reason_str = _("The certificate length exceeds verifiable limits"); + reason_str = _("The certificate length exceeds verifiable limits."); break; case EMP_TLS_CERTIFICATE_REJECT_REASON_UNKNOWN: default: - reason_str = _("The certificate is malformed"); + reason_str = _("The certificate is malformed."); break; } - g_string_append_printf (str, "%s.", reason_str); + g_string_append (str, reason_str); /* add more information in case of HOSTNAME_MISMATCH */ if (reason == EMP_TLS_CERTIFICATE_REJECT_REASON_HOSTNAME_MISMATCH) @@ -201,7 +202,7 @@ reason_to_string (EmpathyTLSDialog *self) if (expected_hostname != NULL && certificate_hostname != NULL) { - g_string_append (str, "\n"); + g_string_append (str, "\n\n"); g_string_append_printf (str, _("Expected hostname: %s"), expected_hostname); g_string_append (str, "\n"); -- cgit v1.2.3 From 6c8e88f2405c3c8f9b8ed8942407643ff5eeed0f Mon Sep 17 00:00:00 2001 From: Danielle Madeley Date: Mon, 11 Oct 2010 12:34:24 +1100 Subject: Force the GcrCertificateWidget to be at least 150 pixels high --- libempathy-gtk/empathy-tls-dialog.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libempathy-gtk/empathy-tls-dialog.c b/libempathy-gtk/empathy-tls-dialog.c index fc198c2f5..9213ac458 100644 --- a/libempathy-gtk/empathy-tls-dialog.c +++ b/libempathy-gtk/empathy-tls-dialog.c @@ -221,6 +221,7 @@ build_gcr_widget (EmpathyTLSDialog *self) GcrCertificate *certificate; GPtrArray *cert_chain = NULL; GArray *first_cert; + int height; EmpathyTLSDialogPriv *priv = GET_PRIV (self); g_object_get (priv->certificate, @@ -232,6 +233,12 @@ build_gcr_widget (EmpathyTLSDialog *self) first_cert->len); widget = gcr_certificate_widget_new (certificate); + /* FIXME: make this widget bigger by default -- GTK+ should really handle + * this sort of thing for us */ + gtk_widget_get_preferred_height (GTK_WIDGET (widget), NULL, &height); + /* force the widget to at least 150 pixels high */ + gtk_widget_set_size_request (GTK_WIDGET (widget), -1, MAX (height, 150)); + g_object_unref (certificate); g_ptr_array_unref (cert_chain); -- cgit v1.2.3