[gtk: 4/5] Apply 4 suggestion(s) to 1 file(s)
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 4/5] Apply 4 suggestion(s) to 1 file(s)
- Date: Fri, 17 Sep 2021 16:51:53 +0000 (UTC)
commit 15ffd49efb2622586802e33e5d7df620e4697683
Author: Emmanuele Bassi <ebassi gmail com>
Date: Fri Sep 17 16:26:00 2021 +0000
Apply 4 suggestion(s) to 1 file(s)
gtk/gtkmenubutton.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkmenubutton.c b/gtk/gtkmenubutton.c
index d36b905770..370956da85 100644
--- a/gtk/gtkmenubutton.c
+++ b/gtk/gtkmenubutton.c
@@ -670,8 +670,9 @@ gtk_menu_button_init (GtkMenuButton *self)
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,
+ gtk_accessible_update_relation (GTK_ACCESSIBLE (self->button),
+ GTK_ACCESSIBLE_RELATION_LABELLED_BY, self, NULL,
+ GTK_ACCESSIBLE_RELATION_DESCRIBED_BY, self, NULL,
-1);
}
@@ -1021,9 +1022,13 @@ 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 labeled 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, -1);
+ /* 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,
+ -1);
image_widget = g_object_new (GTK_TYPE_IMAGE,
"accessible-role", GTK_ACCESSIBLE_ROLE_PRESENTATION,
@@ -1157,7 +1162,9 @@ 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, -1);
+ gtk_accessible_update_relation (GTK_ACCESSIBLE (menu_button->button),
+ GTK_ACCESSIBLE_RELATION_LABELLED_BY, menu_button->label_widget, NULL,
+ -1);
menu_button->image_widget = NULL;
menu_button->child = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]