summaryrefslogtreecommitdiff
path: root/atk-adaptor/accessible-cache.c
diff options
context:
space:
mode:
authorMark Doffman <mark.doffman@codethink.co.uk>2010-01-05 12:50:55 -0800
committerMark Doffman <mark.doffman@codethink.co.uk>2010-01-05 12:50:55 -0800
commit0c6971bdf4c2c0f3e64580287cd17555c32881dd (patch)
tree813b196f4d4f8ef731caacf338ba3ff74a97588c /atk-adaptor/accessible-cache.c
parent5713a8e46559b6de9fbf5fc3e073d0d482d8c7e1 (diff)
downloadat-spi2-core-0c6971bdf4c2c0f3e64580287cd17555c32881dd.tar.gz
Fix object lifecycle errors.
Add an application reference to the event structure.
Diffstat (limited to 'atk-adaptor/accessible-cache.c')
-rw-r--r--atk-adaptor/accessible-cache.c31
1 files changed, 24 insertions, 7 deletions
diff --git a/atk-adaptor/accessible-cache.c b/atk-adaptor/accessible-cache.c
index 4f87b180..c7e27f9b 100644
--- a/atk-adaptor/accessible-cache.c
+++ b/atk-adaptor/accessible-cache.c
@@ -38,7 +38,7 @@ toplevel_added_listener (AtkObject * accessible,
guint index, AtkObject * child);
static void
-remove_object (gpointer data, GObject * gobj);
+remove_object (GObject * source, GObject * gobj, gpointer data);
static void
add_object (SpiCache * cache, GObject * gobj);
@@ -149,7 +149,7 @@ spi_cache_dispose (GObject * object)
/*---------------------------------------------------------------------------*/
static void
-remove_object (gpointer data, GObject * gobj)
+remove_object (GObject * source, GObject * gobj, gpointer data)
{
SpiCache *cache = SPI_CACHE (data);
@@ -167,6 +167,12 @@ add_object (SpiCache * cache, GObject * gobj)
g_hash_table_insert (cache->objects, gobj, NULL);
+#ifdef SPI_ATK_DEBUG
+ g_debug ("CACHE - %s - %d - %s", atk_object_get_name (ATK_OBJECT (gobj)),
+ atk_object_get_role (ATK_OBJECT (gobj)),
+ spi_register_object_to_path (spi_global_register, gobj));
+#endif
+
g_signal_emit (cache, cache_signals [OBJECT_ADDED], 0, gobj);
}
@@ -254,11 +260,6 @@ add_subtree (SpiCache *cache, AtkObject * accessible)
if (!spi_cache_in (cache, G_OBJECT (current)) &&
!atk_state_set_contains_state (set, ATK_STATE_MANAGES_DESCENDANTS))
{
-#ifdef SPI_ATK_DEBUG
- g_debug ("REG - %s - %d - %s", atk_object_get_name (current),
- atk_object_get_role (current),
- atk_dbus_object_to_path (current));
-#endif
append_children (current, traversal);
}
}
@@ -386,4 +387,20 @@ spi_cache_in (SpiCache * cache, GObject * object)
return FALSE;
}
+#ifdef SPI_ATK_DEBUG
+void
+spi_cache_print_info (GObject * obj)
+{
+ char * path = spi_register_object_to_path (spi_global_register, obj);
+
+ if (spi_cache_in (spi_global_cache, obj))
+ g_printf ("%s IC\n", path);
+ else
+ g_printf ("%s NC\n", path);
+
+ if (path)
+ g_free (path);
+}
+#endif
+
/*END------------------------------------------------------------------------*/