diff options
author | Stef Walter <stefw@collabora.co.uk> | 2011-03-04 18:43:29 +0100 |
---|---|---|
committer | Stef Walter <stefw@collabora.co.uk> | 2011-03-04 19:04:13 +0100 |
commit | 06a22db0a23b353082d8b9f9412c558a3054db0e (patch) | |
tree | 995452abb4b33f5772f392aada18db3ebd3ffe68 /gcr/gcr-certificate-widget.c | |
parent | 2d1569b8504479827925b2746ff60a2ef332ec7e (diff) | |
download | gcr-06a22db0a23b353082d8b9f9412c558a3054db0e.tar.gz |
Calculate the minimal/natural size of certificate widget better.
* These are still just gueseses. But they're guesses that look good.
* Added a new GcrViewer implementation that is a scrolled viewer.
We use this in GcrCertificateWidget instead of using GtkScrolledWindow
directly.
https://bugzilla.gnome.org/show_bug.cgi?id=643892
Diffstat (limited to 'gcr/gcr-certificate-widget.c')
-rw-r--r-- | gcr/gcr-certificate-widget.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/gcr/gcr-certificate-widget.c b/gcr/gcr-certificate-widget.c index 8e61063..7bb4b8a 100644 --- a/gcr/gcr-certificate-widget.c +++ b/gcr/gcr-certificate-widget.c @@ -52,21 +52,14 @@ gcr_certificate_widget_constructor (GType type, guint n_props, GObjectConstructP { GObject *obj = G_OBJECT_CLASS (gcr_certificate_widget_parent_class)->constructor (type, n_props, props); GcrCertificateWidget *self = NULL; - GtkWidget *scroll; g_return_val_if_fail (obj, NULL); self = GCR_CERTIFICATE_WIDGET (obj); - self->pv->viewer = gcr_viewer_new (); - - scroll = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll), GTK_SHADOW_ETCHED_IN); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); - gtk_container_add (GTK_CONTAINER (scroll), GTK_WIDGET (self->pv->viewer)); - - gtk_container_add (GTK_CONTAINER (self), scroll); - gtk_widget_show_all (scroll); + self->pv->viewer = gcr_viewer_new_scrolled (); + gtk_container_add (GTK_CONTAINER (self), GTK_WIDGET (self->pv->viewer)); + gtk_widget_show (GTK_WIDGET (self->pv->viewer)); gcr_viewer_add_renderer (self->pv->viewer, GCR_RENDERER (self->pv->renderer)); return obj; |