summaryrefslogtreecommitdiff
path: root/eel
diff options
context:
space:
mode:
authorErnestas Kulik <ernestask@gnome.org>2018-05-14 09:47:41 +0300
committerErnestas Kulik <ernestask@gnome.org>2018-05-22 16:52:48 +0300
commit0cad9482c0cd9615cafe9cecdb66a08ee1e04fa4 (patch)
tree48eeca50035214650a0fb36e6e3cb5114d621aa1 /eel
parent673c81cf9f1d68b71041220e6e44624dee44dbfc (diff)
downloadnautilus-0cad9482c0cd9615cafe9cecdb66a08ee1e04fa4.tar.gz
eel: accessibility: Use ATK to get accessible object
atk_gobject_accessible_get_object() does the same thing and doesn’t require redefining quarks or using magic strings.
Diffstat (limited to 'eel')
-rw-r--r--eel/eel-accessibility.c31
1 files changed, 1 insertions, 30 deletions
diff --git a/eel/eel-accessibility.c b/eel/eel-accessibility.c
index e5ce41e1f..2f4595382 100644
--- a/eel/eel-accessibility.c
+++ b/eel/eel-accessibility.c
@@ -41,35 +41,6 @@ eel_accessibility_set_up_label_widget_relation (GtkWidget *label,
atk_object_add_relationship (atk_widget, ATK_RELATION_LABELLED_BY, atk_label);
}
-static GQuark
-get_quark_gobject (void)
-{
- static GQuark quark_accessible_gobject = 0;
-
- if (!quark_accessible_gobject)
- {
- quark_accessible_gobject = g_quark_from_static_string
- ("object-for-accessible");
- }
-
- return quark_accessible_gobject;
-}
-
-/**
- * eel_accessibility_get_gobject:
- * @object: an AtkObject
- *
- * gets the GObject associated with the AtkObject, for which
- * @object provides accessibility support.
- *
- * Return value: the accessible's associated GObject
- **/
-static gpointer
-eel_accessibility_get_gobject (AtkObject *object)
-{
- return g_object_get_qdata (G_OBJECT (object), get_quark_gobject ());
-}
-
static GailTextUtil *
get_simple_text (gpointer object)
{
@@ -82,7 +53,7 @@ get_simple_text (gpointer object)
}
else
{
- gobject = eel_accessibility_get_gobject (object);
+ gobject = atk_gobject_accessible_get_object (object);
}
if (!gobject)