fixed handling of clicks into a horizontally scrolled treeview.

2005-01-08  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpcontainertreeview.c
	(gimp_container_tree_view_button_press): fixed handling of clicks
	into a horizontally scrolled treeview.
This commit is contained in:
Sven Neumann 2005-01-08 16:35:39 +00:00 committed by Sven Neumann
parent 32731ae0ea
commit 09bb9ebb1d
2 changed files with 13 additions and 10 deletions

View File

@ -1,3 +1,9 @@
2005-01-08 Sven Neumann <sven@gimp.org>
* app/widgets/gimpcontainertreeview.c
(gimp_container_tree_view_button_press): fixed handling of clicks
into a horizontally scrolled treeview.
2005-01-08 Sven Neumann <sven@gimp.org>
* app/dialogs/scale-dialog.c: use a GimpMessageBox to display the

View File

@ -866,8 +866,11 @@ gimp_container_tree_view_button_press (GtkWidget *widget,
if (! GTK_WIDGET_HAS_FOCUS (widget))
gtk_widget_grab_focus (widget);
/* Actually gtk_tree_view_get_path_at_pos() should take care of the
* render direction, but unfortunately it doesn't seem to do that.
*/
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
x = widget->allocation.width - bevent->x;
x = MAX (widget->requisition.width, widget->allocation.width) - bevent->x;
else
x = bevent->x;
@ -880,8 +883,6 @@ gimp_container_tree_view_button_press (GtkWidget *widget,
GimpCellRendererViewable *clicked_cell = NULL;
GtkCellRenderer *edit_cell = NULL;
GdkRectangle column_area;
gint tree_x;
gint tree_y;
GtkTreeIter iter;
gtk_tree_model_get_iter (tree_view->model, &iter, path);
@ -892,10 +893,6 @@ gimp_container_tree_view_button_press (GtkWidget *widget,
tree_view->dnd_viewable = renderer->viewable;
gtk_tree_view_widget_to_tree_coords (tree_view->view,
bevent->x, bevent->y,
&tree_x, &tree_y);
gtk_tree_view_get_background_area (tree_view->view, path,
column, &column_area);
@ -907,19 +904,19 @@ gimp_container_tree_view_button_press (GtkWidget *widget,
toggled_cell = (GimpCellRendererToggle *)
gimp_container_tree_view_find_click_cell (tree_view->toggle_cells,
column, &column_area,
tree_x, tree_y);
bevent->x, bevent->y);
if (! toggled_cell)
clicked_cell = (GimpCellRendererViewable *)
gimp_container_tree_view_find_click_cell (tree_view->renderer_cells,
column, &column_area,
tree_x, tree_y);
bevent->x, bevent->y);
if (! toggled_cell && ! clicked_cell)
edit_cell =
gimp_container_tree_view_find_click_cell (tree_view->editable_cells,
column, &column_area,
tree_x, tree_y);
bevent->x, bevent->y);
g_object_ref (tree_view);