mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 22:41:43 +00:00
text: Set the readonly accessible property
This mirrors what we already do for GtkTextView.
This commit is contained in:
parent
d37b0357b3
commit
2a5af4e1d6
@ -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");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user