From: Matthias Clasen Date: Tue, 20 Jun 2023 14:56:41 +0000 (-0400) Subject: menubutton: Remove all the labelled-by relations X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~118^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=95cd6fe206256802efd9db2876f9919b1e07972e;p=gtk4.git menubutton: Remove all the labelled-by relations This was a bit much, and should not be necessary anymore, now that our name computation handles nested buttons. --- diff --git a/gtk/gtkmenubutton.c b/gtk/gtkmenubutton.c index 59fb9394e5..e162470cf9 100644 --- a/gtk/gtkmenubutton.c +++ b/gtk/gtkmenubutton.c @@ -689,11 +689,6 @@ gtk_menu_button_init (GtkMenuButton *self) gtk_widget_set_sensitive (self->button, FALSE); gtk_widget_add_css_class (GTK_WIDGET (self), "popup"); - - gtk_accessible_update_relation (GTK_ACCESSIBLE (self->button), - GTK_ACCESSIBLE_RELATION_LABELLED_BY, self, NULL, - GTK_ACCESSIBLE_RELATION_DESCRIBED_BY, self, NULL, - -1); } static GtkBuildableIface *parent_buildable_iface; @@ -1046,15 +1041,6 @@ gtk_menu_button_set_icon_name (GtkMenuButton *menu_button, box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_widget_set_halign (box, GTK_ALIGN_CENTER); - /* Because we are setting only an icon, let the inner button be labelled by us - * so the accessible label can be overridden from, for example, an UI file - * using GtkMenuButton as a child of something. - */ - gtk_accessible_update_relation (GTK_ACCESSIBLE (menu_button->button), - GTK_ACCESSIBLE_RELATION_LABELLED_BY, menu_button, NULL, - GTK_ACCESSIBLE_RELATION_DESCRIBED_BY, menu_button, NULL, - -1); - image_widget = g_object_new (GTK_TYPE_IMAGE, "accessible-role", GTK_ACCESSIBLE_ROLE_PRESENTATION, "icon-name", icon_name, @@ -1192,11 +1178,6 @@ gtk_menu_button_set_label (GtkMenuButton *menu_button, gtk_button_set_child (GTK_BUTTON (menu_button->button), box); menu_button->label_widget = label_widget; - gtk_accessible_update_relation (GTK_ACCESSIBLE (menu_button->button), - GTK_ACCESSIBLE_RELATION_LABELLED_BY, menu_button->label_widget, NULL, - GTK_ACCESSIBLE_RELATION_DESCRIBED_BY, menu_button->label_widget, NULL, - -1); - menu_button->image_widget = NULL; menu_button->child = NULL;