[empathy: 3/4] Force the GcrCertificateWidget to be at least 150 pixels high



commit 6c8e88f2405c3c8f9b8ed8942407643ff5eeed0f
Author: Danielle Madeley <danielle madeley collabora co uk>
Date:   Mon Oct 11 12:34:24 2010 +1100

    Force the GcrCertificateWidget to be at least 150 pixels high

 libempathy-gtk/empathy-tls-dialog.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-tls-dialog.c b/libempathy-gtk/empathy-tls-dialog.c
index fc198c2..9213ac4 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);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]