042_treeview_single-focus.patch 921 B

123456789101112131415161718192021222324252627
  1. From: Josselin Mouette <joss@debian.org>
  2. Date: Sun, 4 Nov 2007 16:22:31 +0100
  3. Subject: Don't select the focused item for GTK_SELECTION_SINGLE type
  4. treeviews
  5. This allows the fix in 040_filechooser_single-click.patch to work.
  6. Forwarded: no
  7. ---
  8. gtk/gtktreeview.c | 3 ++-
  9. 1 file changed, 2 insertions(+), 1 deletion(-)
  10. diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
  11. index 89301eb..d86bf0a 100644
  12. --- a/gtk/gtktreeview.c
  13. +++ b/gtk/gtktreeview.c
  14. @@ -9628,7 +9628,8 @@ gtk_tree_view_focus_to_cursor (GtkTreeView *tree_view)
  15. if (cursor_path)
  16. {
  17. - if (tree_view->priv->selection->type == GTK_SELECTION_MULTIPLE)
  18. + if (tree_view->priv->selection->type == GTK_SELECTION_MULTIPLE ||
  19. + tree_view->priv->selection->type == GTK_SELECTION_SINGLE)
  20. gtk_tree_view_real_set_cursor (tree_view, cursor_path, FALSE, FALSE);
  21. else
  22. gtk_tree_view_real_set_cursor (tree_view, cursor_path, TRUE, FALSE);