diff --git a/gtk/a11y/gtkatspicontext.c b/gtk/a11y/gtkatspicontext.c index b93373db5c..c1448b6e22 100644 --- a/gtk/a11y/gtkatspicontext.c +++ b/gtk/a11y/gtkatspicontext.c @@ -426,7 +426,7 @@ handle_accessible_get_property (GDBusConnection *connection, } if (res == NULL) - res = g_variant_new ("(so)", "", "/org/a11y/atspi/null"); + res = gtk_at_spi_null_ref (); } else if (g_strcmp0 (property_name, "ChildCount") == 0) { diff --git a/gtk/a11y/gtkatspiutils.c b/gtk/a11y/gtkatspiutils.c index 4233904bb5..7a572ee41f 100644 --- a/gtk/a11y/gtkatspiutils.c +++ b/gtk/a11y/gtkatspiutils.c @@ -275,3 +275,9 @@ gtk_accessible_role_to_atspi_role (GtkAccessibleRole role) return GTK_ACCESSIBLE_ROLE_WIDGET; } + +GVariant * +gtk_at_spi_null_ref (void) +{ + return g_variant_new ("(so)", "", "/org/a11y/atspi/null"); +} diff --git a/gtk/a11y/gtkatspiutilsprivate.h b/gtk/a11y/gtkatspiutilsprivate.h index b882585a01..6d4f661026 100644 --- a/gtk/a11y/gtkatspiutilsprivate.h +++ b/gtk/a11y/gtkatspiutilsprivate.h @@ -26,4 +26,7 @@ G_BEGIN_DECLS AtspiRole gtk_accessible_role_to_atspi_role (GtkAccessibleRole role); +GVariant * +gtk_at_spi_null_ref (void); + G_END_DECLS