diff options
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 16 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 16 | ||||
-rw-r--r-- | gtk/gtkrbtree.c | 11 | ||||
-rw-r--r-- | gtk/gtkrbtree.h | 3 | ||||
-rw-r--r-- | gtk/gtktreeview.c | 17 |
6 files changed, 70 insertions, 9 deletions
@@ -1,3 +1,19 @@ +2005-07-08 Kristian Rietveld <kris@gtk.org> + + Fixes #165034, reported by Jorn Baayen. + + * gtk/gtkrbtree.[ch] (_gtk_rbtree_set_fixed_height): add a + mark_valid parameter (so we can mark all nodes as valid when we + are setting them to the fixed height). + + * gtk/gtktreeview.c (initialized_fixed_height_mode): mark all + nodes as valid when setting the fixed height, + (do_validate_rows): update call to _set_fixed_height, + (gtk_tree_view_row_inserted): mark node as valid when fixed + height mode is enabled and a height has been set, + (gtk_tree_view_build_tree): if fixed height mode is enabled, + mark new nodes as valid in addition to setting the height. + 2005-07-08 Matthias Clasen <mclasen@redhat.com> * === Released 2.7.2 === diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 88265e1b3e..ed03bc6eed 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,19 @@ +2005-07-08 Kristian Rietveld <kris@gtk.org> + + Fixes #165034, reported by Jorn Baayen. + + * gtk/gtkrbtree.[ch] (_gtk_rbtree_set_fixed_height): add a + mark_valid parameter (so we can mark all nodes as valid when we + are setting them to the fixed height). + + * gtk/gtktreeview.c (initialized_fixed_height_mode): mark all + nodes as valid when setting the fixed height, + (do_validate_rows): update call to _set_fixed_height, + (gtk_tree_view_row_inserted): mark node as valid when fixed + height mode is enabled and a height has been set, + (gtk_tree_view_build_tree): if fixed height mode is enabled, + mark new nodes as valid in addition to setting the height. + 2005-07-08 Matthias Clasen <mclasen@redhat.com> * === Released 2.7.2 === diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 88265e1b3e..ed03bc6eed 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,19 @@ +2005-07-08 Kristian Rietveld <kris@gtk.org> + + Fixes #165034, reported by Jorn Baayen. + + * gtk/gtkrbtree.[ch] (_gtk_rbtree_set_fixed_height): add a + mark_valid parameter (so we can mark all nodes as valid when we + are setting them to the fixed height). + + * gtk/gtktreeview.c (initialized_fixed_height_mode): mark all + nodes as valid when setting the fixed height, + (do_validate_rows): update call to _set_fixed_height, + (gtk_tree_view_row_inserted): mark node as valid when fixed + height mode is enabled and a height has been set, + (gtk_tree_view_build_tree): if fixed height mode is enabled, + mark new nodes as valid in addition to setting the height. + 2005-07-08 Matthias Clasen <mclasen@redhat.com> * === Released 2.7.2 === diff --git a/gtk/gtkrbtree.c b/gtk/gtkrbtree.c index 0b83f71282..cc9d85342b 100644 --- a/gtk/gtkrbtree.c +++ b/gtk/gtkrbtree.c @@ -895,7 +895,8 @@ _gtk_rbtree_mark_invalid (GtkRBTree *tree) void _gtk_rbtree_set_fixed_height (GtkRBTree *tree, - gint height) + gint height, + gboolean mark_valid) { GtkRBNode *node; @@ -911,10 +912,14 @@ _gtk_rbtree_set_fixed_height (GtkRBTree *tree, do { if (GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_INVALID)) - _gtk_rbtree_node_set_height (tree, node, height); + { + _gtk_rbtree_node_set_height (tree, node, height); + if (mark_valid) + _gtk_rbtree_node_mark_valid (tree, node); + } if (node->children) - _gtk_rbtree_set_fixed_height (node->children, height); + _gtk_rbtree_set_fixed_height (node->children, height, mark_valid); } while ((node = _gtk_rbtree_next (tree, node)) != NULL); } diff --git a/gtk/gtkrbtree.h b/gtk/gtkrbtree.h index 6c108217ff..92345d2144 100644 --- a/gtk/gtkrbtree.h +++ b/gtk/gtkrbtree.h @@ -142,7 +142,8 @@ void _gtk_rbtree_node_mark_valid (GtkRBTree *tree, void _gtk_rbtree_column_invalid (GtkRBTree *tree); void _gtk_rbtree_mark_invalid (GtkRBTree *tree); void _gtk_rbtree_set_fixed_height (GtkRBTree *tree, - gint height); + gint height, + gboolean mark_valid); gint _gtk_rbtree_node_find_offset (GtkRBTree *tree, GtkRBNode *node); gint _gtk_rbtree_node_find_parity (GtkRBTree *tree, diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index fdf3bf816c..c44561cfe3 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -5088,7 +5088,7 @@ initialize_fixed_height_mode (GtkTreeView *tree_view) } _gtk_rbtree_set_fixed_height (tree_view->priv->tree, - tree_view->priv->fixed_height); + tree_view->priv->fixed_height, TRUE); } /* Our strategy for finding nodes to validate is a little convoluted. We find @@ -5206,7 +5206,7 @@ do_validate_rows (GtkTreeView *tree_view, gboolean queue_resize) if (!tree_view->priv->fixed_height_check) { if (fixed_height) - _gtk_rbtree_set_fixed_height (tree_view->priv->tree, prev_height); + _gtk_rbtree_set_fixed_height (tree_view->priv->tree, prev_height, FALSE); tree_view->priv->fixed_height_check = 1; } @@ -7309,11 +7309,15 @@ gtk_tree_view_row_inserted (GtkTreeModel *model, { tmpnode = _gtk_rbtree_find_count (tree, indices[depth - 1]); _gtk_rbtree_insert_after (tree, tmpnode, height, FALSE); - } + } done: if (height > 0) - gtk_widget_queue_resize (GTK_WIDGET (tree_view)); + { + if (tree) + _gtk_rbtree_node_mark_valid (tree, tmpnode); + gtk_widget_queue_resize (GTK_WIDGET (tree_view)); + } else install_presize_handler (tree_view); if (free_path) @@ -7703,7 +7707,10 @@ gtk_tree_view_build_tree (GtkTreeView *tree_view, if (tree_view->priv->fixed_height > 0) { if (GTK_RBNODE_FLAG_SET (temp, GTK_RBNODE_INVALID)) - _gtk_rbtree_node_set_height (tree, temp, tree_view->priv->fixed_height); + { + _gtk_rbtree_node_set_height (tree, temp, tree_view->priv->fixed_height); + _gtk_rbtree_node_mark_valid (tree, temp); + } } if (is_list) |