diff options
author | Michael Natterer <mitch@gimp.org> | 2011-09-25 17:43:45 +0200 |
---|---|---|
committer | Michael Natterer <mitch@gimp.org> | 2011-09-25 17:45:57 +0200 |
commit | c7cf1f531d9bb23ac21421dd5eededb7b6b6268e (patch) | |
tree | 296000661b678ecce640479f044cb7b40d768f51 /gtk/gtktreeviewcolumn.c | |
parent | 33f7754a713969e26d3cc15b3543c5c3b35851a2 (diff) | |
download | gtk+-c7cf1f531d9bb23ac21421dd5eededb7b6b6268e.tar.gz |
GtkTreeViewColumn: fix x_offset returned by cell_get_position()
Fixes #640741 - gtk_tree_view_column_get_cell_position() seems to be broken
It is supposed to return the offset within the column, but returned
the offset within the tree, changed by allocation.x of the column's
button (which I don't really unserstand and was clearly not working).
Diffstat (limited to 'gtk/gtktreeviewcolumn.c')
-rw-r--r-- | gtk/gtktreeviewcolumn.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index 00c9a892eb..f2a7ca7e38 100644 --- a/gtk/gtktreeviewcolumn.c +++ b/gtk/gtktreeviewcolumn.c @@ -3109,13 +3109,8 @@ gtk_tree_view_column_cell_get_position (GtkTreeViewColumn *tree_column, &allocation); if (x_offset) - { - GdkRectangle button_allocation; + *x_offset = allocation.x - cell_area.x; - /* Retrieve column offset */ - gtk_widget_get_allocation (priv->button, &button_allocation); - *x_offset = allocation.x - button_allocation.x; - } if (width) *width = allocation.width; |