Description: "ubuntu-almost-fixed-height" private property to speed-up software-center
Bug: https://bugzilla.gnome.org/607447
Bug-Ubuntu: https://launchpad.net/bugs/514879

=== modified file 'gtk/gtktreeview.c'
Index: gtk+-3.6.4/gtk/gtktreeview.c
===================================================================
--- gtk+-3.6.4.orig/gtk/gtktreeview.c	2013-01-10 16:03:58.421595565 +1300
+++ gtk+-3.6.4/gtk/gtktreeview.c	2013-01-10 16:03:58.417595565 +1300
@@ -462,6 +462,7 @@
 
   guint fixed_height_mode : 1;
   guint fixed_height_check : 1;
+  guint ubuntu_almost_fixed_height_mode : 1;
 
   guint reorderable : 1;
   guint header_has_focus : 1;
@@ -552,6 +553,7 @@
   PROP_ENABLE_SEARCH,
   PROP_SEARCH_COLUMN,
   PROP_FIXED_HEIGHT_MODE,
+  PROP_UBUNTU_ALMOST_FIXED_HEIGHT_MODE,
   PROP_HOVER_SELECTION,
   PROP_HOVER_EXPAND,
   PROP_SHOW_EXPANDERS,
@@ -1075,6 +1077,15 @@
                                                            P_("Speeds up GtkTreeView by assuming that all rows have the same height"),
                                                            FALSE,
                                                            GTK_PARAM_READWRITE));
+
+    /* Private ubuntu extension to fix bugzilla bug #607447 */
+    g_object_class_install_property (o_class,
+                                     PROP_UBUNTU_ALMOST_FIXED_HEIGHT_MODE,
+                                     g_param_spec_boolean ("ubuntu-almost-fixed-height-mode",
+                                                           "Private Ubuntu extension",
+							   "Private Ubuntu extension",
+                                                           FALSE,
+                                                           GTK_PARAM_READWRITE));
     
     /**
      * GtkTreeView:hover-selection:
@@ -1736,6 +1747,7 @@
   tree_view->priv->fixed_height = -1;
   tree_view->priv->fixed_height_mode = FALSE;
   tree_view->priv->fixed_height_check = 0;
+  tree_view->priv->ubuntu_almost_fixed_height_mode = FALSE;
   tree_view->priv->selection = _gtk_tree_selection_new_with_tree_view (tree_view);
   tree_view->priv->enable_search = TRUE;
   tree_view->priv->search_column = -1;
@@ -1828,6 +1840,9 @@
     case PROP_FIXED_HEIGHT_MODE:
       gtk_tree_view_set_fixed_height_mode (tree_view, g_value_get_boolean (value));
       break;
+    case PROP_UBUNTU_ALMOST_FIXED_HEIGHT_MODE:
+      tree_view->priv->ubuntu_almost_fixed_height_mode = g_value_get_boolean (value);
+      break;
     case PROP_HOVER_SELECTION:
       tree_view->priv->hover_selection = g_value_get_boolean (value);
       break;
@@ -8740,7 +8755,15 @@
 
   _gtk_tree_view_accessible_changed (tree_view, tree, node);
 
-  if (tree_view->priv->fixed_height_mode
+  if (tree_view->priv->ubuntu_almost_fixed_height_mode
+      && tree_view->priv->fixed_height >= 0)
+    {
+      _gtk_rbtree_node_mark_invalid (tree, node);
+      validate_visible_area (tree_view);
+      if (gtk_widget_get_realized (GTK_WIDGET (tree_view)))
+	gtk_tree_view_node_queue_redraw (tree_view, tree, node);
+    }
+  else if (tree_view->priv->fixed_height_mode
       && tree_view->priv->fixed_height >= 0)
     {
       _gtk_rbtree_node_set_height (tree, node, tree_view->priv->fixed_height);
