diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2021-04-21 11:43:16 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2021-04-21 11:43:16 +0100 |
commit | b24fedda49ac647e581b8743d3824bcbc554e438 (patch) | |
tree | d49e9a7f82ed8c671dabf72ddc0d0799c7d67cc0 | |
parent | 57cc2c4918724dda03b9812ba13ed703ab660c04 (diff) | |
download | gtk+-b24fedda49ac647e581b8743d3824bcbc554e438.tar.gz |
a11y: Update the labelled-by relation of GtkTreeExpandera11y-debug
Whenever we change the :child property, we need to update the
labelled-by relation.
-rw-r--r-- | gtk/gtktreeexpander.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gtk/gtktreeexpander.c b/gtk/gtktreeexpander.c index fb23f6433d..4ebc072236 100644 --- a/gtk/gtktreeexpander.c +++ b/gtk/gtktreeexpander.c @@ -211,10 +211,6 @@ gtk_tree_expander_update_for_list_row (GtkTreeExpander *self) -1); } - gtk_accessible_update_relation (GTK_ACCESSIBLE (self), - GTK_ACCESSIBLE_RELATION_LABELLED_BY, self->child, NULL, - -1); - child = gtk_widget_get_prev_sibling (self->expander); } else @@ -728,6 +724,14 @@ gtk_tree_expander_set_child (GtkTreeExpander *self, { self->child = child; gtk_widget_set_parent (child, GTK_WIDGET (self)); + + gtk_accessible_update_relation (GTK_ACCESSIBLE (self), + GTK_ACCESSIBLE_RELATION_LABELLED_BY, self->child, NULL, + -1); + } + else + { + gtk_accessible_reset_relation (GTK_ACCESSIBLE (self), GTK_ACCESSIBLE_RELATION_LABELLED_BY); } g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_CHILD]); |