changeset 8335:be7d78cf45f1

[gaim-migrate @ 9059] "this fixes a problem that started to occur when the tree view height cause the window's height to grow and pages/plugin frames that we added to the container we not resizing correctly. All this does it pack the tree view with the prefs into a scrolled with with H_POLICY set never and V_POLICY set to always." --Gary Kramlich (amc_grim) committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 25 Feb 2004 21:42:28 +0000
parents 0d1e5870d328
children 4e958012724a
files src/gtkprefs.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkprefs.c	Wed Feb 25 21:26:58 2004 +0000
+++ b/src/gtkprefs.c	Wed Feb 25 21:42:28 2004 +0000
@@ -2529,6 +2529,7 @@
 	GtkWidget *hbox;
 	GtkWidget *bbox;
 	GtkWidget *frame;
+	GtkWidget *scrolled_window;
 	GtkTreeViewColumn *column;
 	GtkCellRenderer *cell;
 	GtkTreeSelection *sel;
@@ -2570,10 +2571,16 @@
 	gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, FALSE, 0);
 	gtk_widget_show (frame);
 
+	scrolled_window = gtk_scrolled_window_new(NULL, NULL);
+	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window),
+								   GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
+	gtk_container_add(GTK_CONTAINER(frame), scrolled_window);
+	gtk_widget_show(scrolled_window);
+								
 	/* The tree -- much inspired by the Gimp */
 	prefstree = gtk_tree_store_new (3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_INT);
 	tree_v = gtk_tree_view_new_with_model (GTK_TREE_MODEL (prefstree));
-	gtk_container_add (GTK_CONTAINER (frame), tree_v);
+	gtk_container_add(GTK_CONTAINER(scrolled_window), tree_v);
 
 	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (tree_v), FALSE);
 	gtk_widget_show(tree_v);