[gtk/matthiasc/a11y] text: Set the readonly accessible property
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/a11y] text: Set the readonly accessible property
- Date: Mon, 12 Oct 2020 03:51:57 +0000 (UTC)
commit efebc3e9a94fd0c0093b01fe161e2e3b0096b504
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Oct 11 23:34:36 2020 -0400
text: Set the readonly accessible property
This mirrors what we already do for GtkTextView.
gtk/gtktext.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/gtk/gtktext.c b/gtk/gtktext.c
index 6910aeff8b..e57836ee10 100644
--- a/gtk/gtktext.c
+++ b/gtk/gtktext.c
@@ -1482,6 +1482,7 @@ gtk_text_class_init (GtkTextClass *class)
"text.redo", NULL);
gtk_widget_class_set_css_name (widget_class, I_("text"));
+ gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_TEXT_BOX);
}
static void
@@ -5430,6 +5431,10 @@ gtk_text_set_editable (GtkText *self,
gtk_text_update_clipboard_actions (self);
gtk_text_update_emoji_action (self);
+ gtk_accessible_update_property (GTK_ACCESSIBLE (self),
+ GTK_ACCESSIBLE_PROPERTY_READ_ONLY, !priv->editable,
+ -1);
+
g_object_notify (G_OBJECT (self), "editable");
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]