From: Kristian Rietveld Date: Tue, 26 Feb 2002 18:56:53 +0000 (+0000) Subject: take into account that a path from a rowref can be NULL. (#72623 and X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=07d3ebd0174a9733e3eb23f35065223af9835e52;p=~andy%2Fgtk take into account that a path from a rowref can be NULL. (#72623 and Tue Feb 26 19:47:16 2002 Kristian Rietveld * gtk/gtktreeview.c (validate_visible_area): take into account that a path from a rowref can be NULL. (#72623 and #72650) * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_render_or_focus): let focus_rectangle be the same as cell_area for empty cells (#69900) --- diff --git a/ChangeLog b/ChangeLog index 5650a4425..9c1b7ae10 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Tue Feb 26 19:47:16 2002 Kristian Rietveld + + * gtk/gtktreeview.c (validate_visible_area): take into account + that a path from a rowref can be NULL. (#72623 and #72650) + + * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_render_or_focus): + let focus_rectangle be the same as cell_area for empty cells (#69900) + Tue Feb 26 11:51:56 2002 Owen Taylor * gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry): Fix diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 5650a4425..9c1b7ae10 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,11 @@ +Tue Feb 26 19:47:16 2002 Kristian Rietveld + + * gtk/gtktreeview.c (validate_visible_area): take into account + that a path from a rowref can be NULL. (#72623 and #72650) + + * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_render_or_focus): + let focus_rectangle be the same as cell_area for empty cells (#69900) + Tue Feb 26 11:51:56 2002 Owen Taylor * gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry): Fix diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 5650a4425..9c1b7ae10 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Tue Feb 26 19:47:16 2002 Kristian Rietveld + + * gtk/gtktreeview.c (validate_visible_area): take into account + that a path from a rowref can be NULL. (#72623 and #72650) + + * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_render_or_focus): + let focus_rectangle be the same as cell_area for empty cells (#69900) + Tue Feb 26 11:51:56 2002 Owen Taylor * gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry): Fix diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 5650a4425..9c1b7ae10 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +Tue Feb 26 19:47:16 2002 Kristian Rietveld + + * gtk/gtktreeview.c (validate_visible_area): take into account + that a path from a rowref can be NULL. (#72623 and #72650) + + * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_render_or_focus): + let focus_rectangle be the same as cell_area for empty cells (#69900) + Tue Feb 26 11:51:56 2002 Owen Taylor * gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry): Fix diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 5650a4425..9c1b7ae10 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Tue Feb 26 19:47:16 2002 Kristian Rietveld + + * gtk/gtktreeview.c (validate_visible_area): take into account + that a path from a rowref can be NULL. (#72623 and #72650) + + * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_render_or_focus): + let focus_rectangle be the same as cell_area for empty cells (#69900) + Tue Feb 26 11:51:56 2002 Owen Taylor * gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry): Fix diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 5650a4425..9c1b7ae10 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Tue Feb 26 19:47:16 2002 Kristian Rietveld + + * gtk/gtktreeview.c (validate_visible_area): take into account + that a path from a rowref can be NULL. (#72623 and #72650) + + * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_render_or_focus): + let focus_rectangle be the same as cell_area for empty cells (#69900) + Tue Feb 26 11:51:56 2002 Owen Taylor * gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry): Fix diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 5650a4425..9c1b7ae10 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Tue Feb 26 19:47:16 2002 Kristian Rietveld + + * gtk/gtktreeview.c (validate_visible_area): take into account + that a path from a rowref can be NULL. (#72623 and #72650) + + * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_render_or_focus): + let focus_rectangle be the same as cell_area for empty cells (#69900) + Tue Feb 26 11:51:56 2002 Owen Taylor * gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry): Fix diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 88ed84000..aae16f592 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -3678,7 +3678,7 @@ validate_visible_area (GtkTreeView *tree_view) if (tree_view->priv->scroll_to_path) { path = gtk_tree_row_reference_get_path (tree_view->priv->scroll_to_path); - if (!_gtk_tree_view_find_node (tree_view, path, &tree, &node)) + if (path && !_gtk_tree_view_find_node (tree_view, path, &tree, &node)) { gtk_tree_model_get_iter (tree_view->priv->model, &iter, path); if (GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_INVALID) || @@ -3707,7 +3707,13 @@ validate_visible_area (GtkTreeView *tree_view) /* the scroll to isn't valid; ignore it. */ { - gtk_tree_path_free (path); + if (tree_view->priv->scroll_to_path && !path) + { + gtk_tree_row_reference_free (tree_view->priv->scroll_to_path); + tree_view->priv->scroll_to_path = NULL; + } + if (path) + gtk_tree_path_free (path); path = NULL; } } diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index 00d5afa19..04a71daaf 100644 --- a/gtk/gtktreeviewcolumn.c +++ b/gtk/gtktreeviewcolumn.c @@ -2370,10 +2370,8 @@ gtk_tree_view_column_cell_render_or_focus (GtkTreeViewColumn *tree_column, if (min_x >= max_x || min_y >= max_y) { *focus_rectangle = *cell_area; - focus_rectangle->x -= focus_line_width; - focus_rectangle->y -= focus_line_width; - focus_rectangle->width += 2 * focus_line_width; - focus_rectangle->height += 2 * focus_line_width; + /* don't change the focus_rectangle, just draw it nicely inside + * the cell area */ } else {