]> Pileus Git - ~andy/gtk/commitdiff
take into account that a path from a rowref can be NULL. (#72623 and
authorKristian Rietveld <kris@gtk.org>
Tue, 26 Feb 2002 18:56:53 +0000 (18:56 +0000)
committerKristian Rietveld <kristian@src.gnome.org>
Tue, 26 Feb 2002 18:56:53 +0000 (18:56 +0000)
Tue Feb 26 19:47:16 2002  Kristian Rietveld  <kris@gtk.org>

        * 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)

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktreeview.c
gtk/gtktreeviewcolumn.c

index 5650a442554eed0a8aba459b44dfa2d78bf35ea5..9c1b7ae10ec56da36595df07d1646f09fd076f8f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Tue Feb 26 19:47:16 2002  Kristian Rietveld  <kris@gtk.org>
+
+       * 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  <otaylor@redhat.com>
 
        * gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry): Fix
index 5650a442554eed0a8aba459b44dfa2d78bf35ea5..9c1b7ae10ec56da36595df07d1646f09fd076f8f 100644 (file)
@@ -1,3 +1,11 @@
+Tue Feb 26 19:47:16 2002  Kristian Rietveld  <kris@gtk.org>
+
+       * 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  <otaylor@redhat.com>
 
        * gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry): Fix
index 5650a442554eed0a8aba459b44dfa2d78bf35ea5..9c1b7ae10ec56da36595df07d1646f09fd076f8f 100644 (file)
@@ -1,3 +1,11 @@
+Tue Feb 26 19:47:16 2002  Kristian Rietveld  <kris@gtk.org>
+
+       * 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  <otaylor@redhat.com>
 
        * gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry): Fix
index 5650a442554eed0a8aba459b44dfa2d78bf35ea5..9c1b7ae10ec56da36595df07d1646f09fd076f8f 100644 (file)
@@ -1,3 +1,11 @@
+Tue Feb 26 19:47:16 2002  Kristian Rietveld  <kris@gtk.org>
+
+       * 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  <otaylor@redhat.com>
 
        * gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry): Fix
index 5650a442554eed0a8aba459b44dfa2d78bf35ea5..9c1b7ae10ec56da36595df07d1646f09fd076f8f 100644 (file)
@@ -1,3 +1,11 @@
+Tue Feb 26 19:47:16 2002  Kristian Rietveld  <kris@gtk.org>
+
+       * 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  <otaylor@redhat.com>
 
        * gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry): Fix
index 5650a442554eed0a8aba459b44dfa2d78bf35ea5..9c1b7ae10ec56da36595df07d1646f09fd076f8f 100644 (file)
@@ -1,3 +1,11 @@
+Tue Feb 26 19:47:16 2002  Kristian Rietveld  <kris@gtk.org>
+
+       * 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  <otaylor@redhat.com>
 
        * gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry): Fix
index 5650a442554eed0a8aba459b44dfa2d78bf35ea5..9c1b7ae10ec56da36595df07d1646f09fd076f8f 100644 (file)
@@ -1,3 +1,11 @@
+Tue Feb 26 19:47:16 2002  Kristian Rietveld  <kris@gtk.org>
+
+       * 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  <otaylor@redhat.com>
 
        * gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry): Fix
index 88ed84000544224fd505fdd86655e883cfc67b90..aae16f59241799e5c8b5e1950829c26130d4587c 100644 (file)
@@ -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;
        }      
     }
index 00d5afa193ce14cd59da6cb487e1a840616cb6d8..04a71daaf2acf58d63d7934ce00cb91e3983cff8 100644 (file)
@@ -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
        {