[gtk/a11y/atspi: 1/3] atspi: Set placeholder-text attribute
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/a11y/atspi: 1/3] atspi: Set placeholder-text attribute
- Date: Tue, 13 Oct 2020 13:45:23 +0000 (UTC)
commit 81440675af64f0b18d13085af2759bcca97cdc92
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Oct 12 23:20:58 2020 -0400
atspi: Set placeholder-text attribute
This is how GTK3 passes placeholder-text to orca,
and it works - orca reads it.
gtk/a11y/gtkatspicontext.c | 11 +++++++++++
1 file changed, 11 insertions(+)
---
diff --git a/gtk/a11y/gtkatspicontext.c b/gtk/a11y/gtkatspicontext.c
index a8d3f16563..92562e4a04 100644
--- a/gtk/a11y/gtkatspicontext.c
+++ b/gtk/a11y/gtkatspicontext.c
@@ -401,6 +401,17 @@ handle_accessible_method (GDBusConnection *connection,
g_variant_builder_open (&builder, G_VARIANT_TYPE ("a{ss}"));
g_variant_builder_add (&builder, "{ss}", "toolkit", "GTK");
+
+ if (gtk_at_context_has_accessible_property (GTK_AT_CONTEXT (self),
GTK_ACCESSIBLE_PROPERTY_PLACEHOLDER))
+ {
+ GtkAccessibleValue *value;
+
+ value = gtk_at_context_get_accessible_property (GTK_AT_CONTEXT (self),
GTK_ACCESSIBLE_PROPERTY_PLACEHOLDER);
+
+ g_variant_builder_add (&builder, "{ss}",
+ "placeholder-text", gtk_string_accessible_value_get (value));
+ }
+
g_variant_builder_close (&builder);
g_dbus_method_invocation_return_value (invocation, g_variant_builder_end (&builder));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]