[nautilus/wip/ernestask/gtk4: 5/19] eel: accessibility: Use ATK to get accessible object



commit 32355aaf755af515a69318af688073f12e4dcf49
Author: Ernestas Kulik <ernestask gnome org>
Date:   Mon May 14 09:47:41 2018 +0300

    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.

 eel/eel-accessibility.c | 31 +------------------------------
 1 file changed, 1 insertion(+), 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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]