mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 14:30:15 +00:00
treeview: Notify accessible about focus changes
This commit is contained in:
parent
a4559f1e19
commit
f90ff5d50b
@ -2103,6 +2103,12 @@ _gtk_tree_view_accessible_add_state (GtkTreeView *treeview,
|
||||
|
||||
accessible = GTK_TREE_VIEW_ACCESSIBLE (obj);
|
||||
|
||||
if (state == GTK_CELL_RENDERER_FOCUSED)
|
||||
{
|
||||
/* will add later */
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < gtk_tree_view_get_n_columns (treeview); i++)
|
||||
{
|
||||
GtkCellAccessible *cell = peek_cell (accessible,
|
||||
@ -2135,6 +2141,12 @@ _gtk_tree_view_accessible_remove_state (GtkTreeView *treeview,
|
||||
|
||||
accessible = GTK_TREE_VIEW_ACCESSIBLE (obj);
|
||||
|
||||
if (state == GTK_CELL_RENDERER_FOCUSED)
|
||||
{
|
||||
/* will add later */
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < gtk_tree_view_get_n_columns (treeview); i++)
|
||||
{
|
||||
GtkCellAccessible *cell = peek_cell (accessible,
|
||||
|
@ -13188,6 +13188,10 @@ gtk_tree_view_real_set_cursor (GtkTreeView *tree_view,
|
||||
{
|
||||
if (!(flags & CURSOR_INVALID) && tree_view->priv->cursor_node)
|
||||
{
|
||||
_gtk_tree_view_accessible_remove_state (tree_view,
|
||||
tree_view->priv->cursor_tree,
|
||||
tree_view->priv->cursor_node,
|
||||
GTK_CELL_RENDERER_FOCUSED);
|
||||
_gtk_tree_view_queue_draw_node (tree_view,
|
||||
tree_view->priv->cursor_tree,
|
||||
tree_view->priv->cursor_node,
|
||||
@ -13250,6 +13254,11 @@ gtk_tree_view_real_set_cursor (GtkTreeView *tree_view,
|
||||
tree_view->priv->cursor_node,
|
||||
NULL);
|
||||
}
|
||||
|
||||
_gtk_tree_view_accessible_add_state (tree_view,
|
||||
tree_view->priv->cursor_tree,
|
||||
tree_view->priv->cursor_node,
|
||||
GTK_CELL_RENDERER_FOCUSED);
|
||||
}
|
||||
|
||||
g_signal_emit (tree_view, tree_view_signals[CURSOR_CHANGED], 0);
|
||||
|
Loading…
Reference in New Issue
Block a user