[gnome-keyring: 2/6] gcr: Make key widget scroll and size properly.



commit 2d10ec93e02076b5df4d83284b208a29d5fb564e
Author: Stef Walter <stefw collabora co uk>
Date:   Wed Apr 6 13:49:09 2011 +0200

    gcr: Make key widget scroll and size properly.
    
    Also fix the test program.

 gcr/gcr-key-widget.c |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/gcr/gcr-key-widget.c b/gcr/gcr-key-widget.c
index 5d8f28f..59eb04f 100644
--- a/gcr/gcr-key-widget.c
+++ b/gcr/gcr-key-widget.c
@@ -89,21 +89,14 @@ gcr_key_widget_constructor (GType type, guint n_props, GObjectConstructParam *pr
 {
 	GObject *obj = G_OBJECT_CLASS (gcr_key_widget_parent_class)->constructor (type, n_props, props);
 	GcrKeyWidget *self = NULL;
-	GtkWidget *scroll;
 
 	g_return_val_if_fail (obj, NULL);
 
 	self = GCR_KEY_WIDGET (obj);
 
-	self->pv->viewer = gcr_viewer_new ();
-
-	scroll = gtk_scrolled_window_new (NULL, NULL);
-	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
-	gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll), GTK_SHADOW_ETCHED_IN);
-	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;



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