recipes: x-libs/gtk2: make GTK+-2 more stable
[dragora.git] / patches / gtk2 / 042_treeview_single-focus.patch
blob119b13e69f3cfbd41597468b517833c7637eef32
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
6 This allows the fix in 040_filechooser_single-click.patch to work.
8 Forwarded: no
9 ---
10 gtk/gtktreeview.c | 3 ++-
11 1 file changed, 2 insertions(+), 1 deletion(-)
13 diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
14 index 89301eb..d86bf0a 100644
15 --- a/gtk/gtktreeview.c
16 +++ b/gtk/gtktreeview.c
17 @@ -9628,7 +9628,8 @@ gtk_tree_view_focus_to_cursor (GtkTreeView *tree_view)
19 if (cursor_path)
21 - if (tree_view->priv->selection->type == GTK_SELECTION_MULTIPLE)
22 + if (tree_view->priv->selection->type == GTK_SELECTION_MULTIPLE ||
23 + tree_view->priv->selection->type == GTK_SELECTION_SINGLE)
24 gtk_tree_view_real_set_cursor (tree_view, cursor_path, FALSE, FALSE);
25 else
26 gtk_tree_view_real_set_cursor (tree_view, cursor_path, TRUE, FALSE);