]> Pileus Git - ~andy/gtk/commitdiff
Bug #497218. Emit "active-descendant-changed" when focus first comes into
authorLi Yuan <li.yuan@sun.com>
Fri, 11 Jan 2008 09:48:23 +0000 (09:48 +0000)
committerLi Yuan <liyuan@src.gnome.org>
Fri, 11 Jan 2008 09:48:23 +0000 (09:48 +0000)
2008-01-11  Li Yuan  <li.yuan@sun.com>

        * gailtreeview.c: (gail_tree_view_ref_child),
        (idle_cursor_changed):
        Bug #497218. Emit "active-descendant-changed" when focus first comes
        into treeview. Add/remove ATK_STATE_FOCUSED when cursor changes.

svn path=/trunk/; revision=19350

modules/other/gail/ChangeLog
modules/other/gail/gailtreeview.c

index 921721003adf25d019258fb7b37def2613474200..5292640f967babfd19a4e2c243f789e177bd5ade 100644 (file)
@@ -1,3 +1,10 @@
+2008-01-11  Li Yuan  <li.yuan@sun.com>
+
+       * gailtreeview.c: (gail_tree_view_ref_child),
+       (idle_cursor_changed):
+       Bug #497218. Emit "active-descendant-changed" when focus first comes
+       into treeview. Add/remove ATK_STATE_FOCUSED when cursor changes.
+
 2008-01-11  Li Yuan  <li.yuan@sun.com>
 
        * gailtreeview.c: (gail_tree_view_get_n_rows):
index cee016cbaa8b4014c1a69935399b74f184133bc5..6b88454b388390e8532d1e47b3d4188c19b00dd1 100644 (file)
@@ -987,6 +987,9 @@ gail_tree_view_ref_child (AtkObject *obj,
           {
             gailview->focus_cell = g_object_ref (cell);
             gail_cell_add_state (cell, ATK_STATE_FOCUSED, FALSE);
+            g_signal_emit_by_name (gailview,
+                                   "active-descendant-changed",
+                                   cell);
           }
       }
     g_list_free (renderer_list); 
@@ -2625,12 +2628,16 @@ idle_cursor_changed (gpointer data)
           if (gail_tree_view->focus_cell)
             {
               gail_cell_remove_state (GAIL_CELL (gail_tree_view->focus_cell), ATK_STATE_ACTIVE, FALSE); 
+              gail_cell_remove_state (GAIL_CELL (gail_tree_view->focus_cell), ATK_STATE_FOCUSED, FALSE);
               g_object_unref (gail_tree_view->focus_cell);
             }
           gail_tree_view->focus_cell = cell;
 
           if (GTK_WIDGET_HAS_FOCUS (widget))
-            gail_cell_add_state (GAIL_CELL (cell), ATK_STATE_ACTIVE, FALSE);
+            {
+              gail_cell_add_state (GAIL_CELL (cell), ATK_STATE_ACTIVE, FALSE);
+              gail_cell_add_state (GAIL_CELL (cell), ATK_STATE_FOCUSED, FALSE);
+            }
           g_signal_emit_by_name (gail_tree_view,
                                  "active-descendant-changed",
                                  cell);