improved the fix for bug #152662 and removed trailing whitespace.

2004-09-15  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpcontainertreeview.c
	(gimp_container_tree_view_menu_position): improved the fix for bug
	#152662 and removed trailing whitespace.
This commit is contained in:
Sven Neumann 2004-09-15 09:34:02 +00:00 committed by Sven Neumann
parent 8c4062f2b2
commit b5f8fa24d8
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2004-09-15 Sven Neumann <sven@gimp.org>
* app/widgets/gimpcontainertreeview.c
(gimp_container_tree_view_menu_position): improved the fix for bug
#152662 and removed trailing whitespace.
2004-09-15 Nathan Summers <rock@gimp.org>
* app/widgets/gimpcontainertreeview.c

View File

@ -353,17 +353,18 @@ gimp_container_tree_view_menu_position (GtkMenu *menu,
{
GtkTreePath *path;
GdkRectangle cell_rect;
gint center;
path = gtk_tree_model_get_path (tree_view->model, &selected_iter);
gtk_tree_view_get_cell_area (tree_view->view, path,
tree_view->main_column, &cell_rect);
gtk_tree_path_free (path);
cell_rect.y = CLAMP (cell_rect.y, 0, widget->allocation.height);
center = cell_rect.y + cell_rect.height / 2;
center = CLAMP (center, 0, widget->allocation.height);
*x += widget->allocation.width / 2;
*y += cell_rect.y + cell_rect.height / 2;
*y += center;
}
else
{