Merge branch 'michaelweghorn/a11y_atspi_map_level_property' into 'main'

a11y atspi: Map GTK_ACCESSIBLE_PROPERTY_LEVEL to AT-SPI attr

See merge request GNOME/gtk!6549
This commit is contained in:
Matthias Clasen 2024-05-13 16:02:53 +00:00
commit dc07bcf3a3

View File

@ -530,6 +530,15 @@ 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_LEVEL))
{
GtkAccessibleValue *value = gtk_at_context_get_accessible_property (GTK_AT_CONTEXT (self),
GTK_ACCESSIBLE_PROPERTY_LEVEL);
char *level = g_strdup_printf ("%d", gtk_int_accessible_value_get (value));
g_variant_builder_add (&builder, "{ss}", "level", level);
g_free (level);
}
if (gtk_at_context_has_accessible_property (GTK_AT_CONTEXT (self), GTK_ACCESSIBLE_PROPERTY_PLACEHOLDER))
{
GtkAccessibleValue *value;