diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2023-02-04 12:17:47 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2023-02-04 12:17:47 +0100 |
commit | 48ea50510f5921707e0b1c90f9297754ef606df5 (patch) | |
tree | c9c1f4e98de54e1b7f624286437d776e15988f2b | |
parent | d31450929fae019cf9eefc5404338384293a10a5 (diff) | |
download | gtk+-ebassi/at-context-path.tar.gz |
inspector: Remove the GtkAtSpiContext useebassi/at-context-path
There is generic API to access the D-Bus object path of the
accessibility context object.
-rw-r--r-- | gtk/inspector/a11y.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gtk/inspector/a11y.c b/gtk/inspector/a11y.c index f184489204..bdd0802da2 100644 --- a/gtk/inspector/a11y.c +++ b/gtk/inspector/a11y.c @@ -34,9 +34,6 @@ #include "gtknoselection.h" #include "gtkfilterlistmodel.h" #include "gtkboolfilter.h" -#ifdef G_OS_UNIX -#include "a11y/gtkatspicontextprivate.h" -#endif typedef enum { STATE, @@ -233,17 +230,19 @@ update_path (GtkInspectorA11y *sl) const char *path = "—"; #ifdef G_OS_UNIX GtkATContext *context; + const char *context_path; context = gtk_accessible_get_at_context (GTK_ACCESSIBLE (sl->object)); - if (GTK_IS_AT_SPI_CONTEXT (context)) + context_path = gtk_at_context_get_dbus_object_path (context); + if (context_path == NULL) { - if (gtk_at_context_is_realized (context)) - path = gtk_at_spi_context_get_context_path (GTK_AT_SPI_CONTEXT (context)); - else + if (!gtk_at_context_is_realized (context)) path = "not realized"; + else + path = "not available on accessibility bus"; } else - path = "not on bus"; + path = context_path; #endif gtk_label_set_label (GTK_LABEL (sl->path), path); |