diff options
author | Li Yuan <li.yuan@sun.com> | 2009-02-25 08:41:49 +0000 |
---|---|---|
committer | Li Yuan <liyuan@src.gnome.org> | 2009-02-25 08:41:49 +0000 |
commit | 6336e980828688deca8c027ea1759a909bfbad2f (patch) | |
tree | ca3c08117027e1cf6299db876dc1f2baa8ec83da /modules | |
parent | c98d7d5f5edf3b8c80d14bb9df6c90b22dbe16ff (diff) | |
download | gtk+-6336e980828688deca8c027ea1759a909bfbad2f.tar.gz |
Bug #571001. Set the cell's showing state based on bin_window coordinates.
2009-02-25 Li Yuan <li.yuan@sun.com>
* gailtreeview.c: (is_cell_showing):
Bug #571001. Set the cell's showing state based on bin_window
coordinates.
svn path=/trunk/; revision=22403
Diffstat (limited to 'modules')
-rw-r--r-- | modules/other/gail/ChangeLog | 6 | ||||
-rw-r--r-- | modules/other/gail/gailtreeview.c | 17 |
2 files changed, 15 insertions, 8 deletions
diff --git a/modules/other/gail/ChangeLog b/modules/other/gail/ChangeLog index 19321b1280..6b69abacc1 100644 --- a/modules/other/gail/ChangeLog +++ b/modules/other/gail/ChangeLog @@ -1,3 +1,9 @@ +2009-02-25 Li Yuan <li.yuan@sun.com> + + * gailtreeview.c: (is_cell_showing): + Bug #571001. Set the cell's showing state based on bin_window + coordinates. + 2009-02-17 Matthias Clasen <mclasen@redhat.com> * === Released 2.15.4 === diff --git a/modules/other/gail/gailtreeview.c b/modules/other/gail/gailtreeview.c index 6a8edb4555..0604ecec56 100644 --- a/modules/other/gail/gailtreeview.c +++ b/modules/other/gail/gailtreeview.c @@ -3075,6 +3075,7 @@ is_cell_showing (GtkTreeView *tree_view, { GdkRectangle rect, *visible_rect; GdkRectangle rect1, *tree_cell_rect; + gint bx, by; gboolean is_showing; /* * A cell is considered "SHOWING" if any part of the cell is in the visible @@ -3088,18 +3089,18 @@ is_cell_showing (GtkTreeView *tree_view, visible_rect = ▭ tree_cell_rect = &rect1; tree_cell_rect->x = cell_rect->x; + tree_cell_rect->y = cell_rect->y; tree_cell_rect->width = cell_rect->width; tree_cell_rect->height = cell_rect->height; gtk_tree_view_get_visible_rect (tree_view, visible_rect); - gtk_tree_view_convert_widget_to_bin_window_coords (tree_view, - cell_rect->x, cell_rect->y, - NULL, &(rect1.y)); - - if (((tree_cell_rect->x + tree_cell_rect->width) < visible_rect->x) || - ((tree_cell_rect->y + tree_cell_rect->height) < (visible_rect->y)) || - (tree_cell_rect->x > (visible_rect->x + visible_rect->width)) || - (tree_cell_rect->y > (visible_rect->y + visible_rect->height))) + gtk_tree_view_convert_tree_to_bin_window_coords (tree_view, visible_rect->x, + visible_rect->y, &bx, &by); + + if (((tree_cell_rect->x + tree_cell_rect->width) < bx) || + ((tree_cell_rect->y + tree_cell_rect->height) < by) || + (tree_cell_rect->x > (bx + visible_rect->width)) || + (tree_cell_rect->y > (by + visible_rect->height))) is_showing = FALSE; else is_showing = TRUE; |