[gtk/matthiasc/for-master] modelbutton: Initial accessibility setup
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master] modelbutton: Initial accessibility setup
- Date: Wed, 21 Oct 2020 20:36:41 +0000 (UTC)
commit 4795cc6f5b2b8ea737276c5af0f450b490a857d7
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Oct 21 16:35:39 2020 -0400
modelbutton: Initial accessibility setup
Set the accessible role to GTK_ACCESSIBLE_ROLE_MENU_ITEM.
This is incomplete, we need to recreate the context when
the buttons role changes, and there are other things that
need to be set.
gtk/gtkmodelbutton.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkmodelbutton.c b/gtk/gtkmodelbutton.c
index 93f9d011fc..3c3730419e 100644
--- a/gtk/gtkmodelbutton.c
+++ b/gtk/gtkmodelbutton.c
@@ -1186,7 +1186,8 @@ gtk_model_button_class_init (GtkModelButtonClass *class)
widget_class->activate_signal = signals[SIGNAL_CLICKED];
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BOX_LAYOUT);
- gtk_widget_class_set_css_name (GTK_WIDGET_CLASS (class), I_("modelbutton"));
+ gtk_widget_class_set_css_name (widget_class, I_("modelbutton"));
+ gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_MENU_ITEM);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]