diff options
author | Benjamin Otte <otte@redhat.com> | 2011-12-12 16:41:21 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2011-12-16 04:53:15 +0100 |
commit | 3112679a5ea58d6ee8f816b592e7188b8b3cea07 (patch) | |
tree | 166fea0e8f2d1baee2fb58d6eab94891f6332d64 /gtk/gtktreeselection.c | |
parent | 1a3226e2f7d730d17643b2abb4072d3369479448 (diff) | |
download | gtk+-3112679a5ea58d6ee8f816b592e7188b8b3cea07.tar.gz |
treeview: Signal selection changes to the accessible
And another signal gone.
Diffstat (limited to 'gtk/gtktreeselection.c')
-rw-r--r-- | gtk/gtktreeselection.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gtk/gtktreeselection.c b/gtk/gtktreeselection.c index 071a87ba6d..7b56563181 100644 --- a/gtk/gtktreeselection.c +++ b/gtk/gtktreeselection.c @@ -25,6 +25,7 @@ #include "gtkmarshalers.h" #include "gtkintl.h" #include "gtktypebuiltins.h" +#include "a11y/gtktreeviewaccessible.h" /** @@ -1636,7 +1637,16 @@ gtk_tree_selection_real_select_node (GtkTreeSelection *selection, if (toggle) { - node->flags ^= GTK_RBNODE_IS_SELECTED; + if (!GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_SELECTED)) + { + GTK_RBNODE_SET_FLAG (node, GTK_RBNODE_IS_SELECTED); + _gtk_tree_view_accessible_add_state (priv->tree_view, tree, node, GTK_CELL_RENDERER_SELECTED); + } + else + { + GTK_RBNODE_UNSET_FLAG (node, GTK_RBNODE_IS_SELECTED); + _gtk_tree_view_accessible_remove_state (priv->tree_view, tree, node, GTK_CELL_RENDERER_SELECTED); + } _gtk_tree_view_queue_draw_node (priv->tree_view, tree, node, NULL); |