[gtk+] a11y: Emit active-descendants-changed when focus changes



commit 173317e9ce6d8ccb3fe9371e270aea38cd76c3ef
Author: Benjamin Otte <otte redhat com>
Date:   Tue Mar 5 11:55:28 2013 +0100

    a11y: Emit active-descendants-changed when focus changes
    
    This fixes the a11y/tree-relationships testcase.
    
    The emission was lost in refactoring in commit
    76670734f4330acc28c3c1d885ef944e85beb36e

 gtk/a11y/gtktreeviewaccessible.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gtk/a11y/gtktreeviewaccessible.c b/gtk/a11y/gtktreeviewaccessible.c
index 09bb72f..31032b2 100644
--- a/gtk/a11y/gtktreeviewaccessible.c
+++ b/gtk/a11y/gtktreeviewaccessible.c
@@ -1926,6 +1926,14 @@ _gtk_tree_view_accessible_add_state (GtkTreeView          *treeview,
 
       if (cell != NULL)
         _gtk_cell_accessible_state_changed (cell, state, 0);
+
+      if (state == GTK_CELL_RENDERER_FOCUSED)
+        {
+          if (cell == NULL)
+            cell = create_cell (treeview, accessible, tree, node, single_column);
+          
+          g_signal_emit_by_name (accessible, "active-descendant-changed", cell);
+        }
     }
   else
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]