x should be changed when converting widget <=> bin_window coordinates, not

2007-07-11  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktreeview.c (gtk_tree_view_*_to_*_coords): x should be
	changed when converting widget <=> bin_window coordinates, not
	when bin_window <=> tree_window.


svn path=/trunk/; revision=18446
This commit is contained in:
Kristian Rietveld 2007-07-11 18:42:28 +00:00 committed by Kristian Rietveld
parent 4c40014a86
commit 23b358d7b5
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2007-07-11 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_*_to_*_coords): x should be
changed when converting widget <=> bin_window coordinates, not
when bin_window <=> tree_window.
2007-07-11 Matthias Clasen <mclasen@redhat.com> 2007-07-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk.symbols: * gtk/gtk.symbols:

View File

@ -12974,7 +12974,7 @@ gtk_tree_view_convert_widget_to_bin_window_coords (GtkTreeView *tree_view,
g_return_if_fail (GTK_IS_TREE_VIEW (tree_view)); g_return_if_fail (GTK_IS_TREE_VIEW (tree_view));
if (bx) if (bx)
*bx = wx; *bx = wx + tree_view->priv->hadjustment->value;
if (by) if (by)
*by = wy - TREE_VIEW_HEADER_HEIGHT (tree_view); *by = wy - TREE_VIEW_HEADER_HEIGHT (tree_view);
} }
@ -13002,7 +13002,7 @@ gtk_tree_view_convert_bin_window_to_widget_coords (GtkTreeView *tree_view,
g_return_if_fail (GTK_IS_TREE_VIEW (tree_view)); g_return_if_fail (GTK_IS_TREE_VIEW (tree_view));
if (wx) if (wx)
*wx = bx; *wx = bx - tree_view->priv->hadjustment->value;
if (wy) if (wy)
*wy = by + TREE_VIEW_HEADER_HEIGHT (tree_view); *wy = by + TREE_VIEW_HEADER_HEIGHT (tree_view);
} }
@ -13030,7 +13030,7 @@ gtk_tree_view_convert_tree_to_bin_window_coords (GtkTreeView *tree_view,
g_return_if_fail (GTK_IS_TREE_VIEW (tree_view)); g_return_if_fail (GTK_IS_TREE_VIEW (tree_view));
if (bx) if (bx)
*bx = tx - tree_view->priv->hadjustment->value; *bx = tx;
if (by) if (by)
*by = ty - tree_view->priv->dy; *by = ty - tree_view->priv->dy;
} }
@ -13058,7 +13058,7 @@ gtk_tree_view_convert_bin_window_to_tree_coords (GtkTreeView *tree_view,
g_return_if_fail (GTK_IS_TREE_VIEW (tree_view)); g_return_if_fail (GTK_IS_TREE_VIEW (tree_view));
if (tx) if (tx)
*tx = bx + tree_view->priv->hadjustment->value; *tx = bx;
if (ty) if (ty)
*ty = by + tree_view->priv->dy; *ty = by + tree_view->priv->dy;
} }