summaryrefslogtreecommitdiff
path: root/atk-adaptor/accessible-register.c
diff options
context:
space:
mode:
authorMark Doffman <mdoff@silver-wind.(none)>2009-01-19 09:26:08 +0000
committerMark Doffman <mdoff@silver-wind.(none)>2009-01-19 09:26:08 +0000
commit5d30ed4afc98e7f19f35dfcfc1fbd534966e8344 (patch)
treefd6cbe6f66cd47bb579b91050c23fe48df62eb66 /atk-adaptor/accessible-register.c
parente09291e0c5ea8f7ca59f88868657b49a9e17b57b (diff)
downloadat-spi2-atk-5d30ed4afc98e7f19f35dfcfc1fbd534966e8344.tar.gz
Added debug option to remove all recoverable
warnings.
Diffstat (limited to 'atk-adaptor/accessible-register.c')
-rw-r--r--atk-adaptor/accessible-register.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/atk-adaptor/accessible-register.c b/atk-adaptor/accessible-register.c
index 8b8e34a..9a095f6 100644
--- a/atk-adaptor/accessible-register.c
+++ b/atk-adaptor/accessible-register.c
@@ -176,6 +176,7 @@ register_accessible (AtkObject *accessible)
/*---------------------------------------------------------------------------*/
+#ifdef SPI_ATK_DEBUG
/*
* This function checks that the ref-count of an accessible
* is greater than 1.
@@ -199,6 +200,7 @@ non_owned_accessible (AtkObject *accessible)
return FALSE;
}
}
+#endif /* SPI_ATK_DEBUG */
/*---------------------------------------------------------------------------*/
@@ -215,7 +217,9 @@ has_manages_descendants (AtkObject *accessible)
state = atk_object_ref_state_set (accessible);
if (atk_state_set_contains_state (state, ATK_STATE_MANAGES_DESCENDANTS))
{
+#ifdef SPI_ATK_DEBUG
g_warning ("AT-SPI: Object with 'Manages descendants' states not currently handled by AT-SPI");
+#endif
result = TRUE;
}
g_object_unref (state);
@@ -269,8 +273,9 @@ register_subtree (AtkObject *accessible)
{
tmp = atk_object_ref_accessible_child (current, i);
- /* TODO Add debug wrapper */
+#ifdef SPI_ATK_DEBUG
non_owned_accessible (tmp);
+#endif
if (object_to_ref (tmp))
{
@@ -421,9 +426,10 @@ tree_update_listener (GSignalInvocationHint *signal_hint,
if (object_to_ref (accessible))
{
- /* TODO Add debug wrapper */
+#ifdef SPI_ATK_DEBUG
if (recursion_check_and_set ())
g_warning ("AT-SPI: Recursive use of registration module");
+#endif
values = (AtkPropertyValues*) g_value_get_pointer (&param_values[1]);
pname = values[0].property_name;
@@ -468,9 +474,10 @@ tree_update_children_listener (GSignalInvocationHint *signal_hint,
if (object_to_ref (accessible))
{
- /* TODO Add debug wrapper */
+#ifdef SPI_ATK_DEBUG
if (recursion_check_and_set ())
g_warning ("AT-SPI: Recursive use of registration module");
+#endif
if (signal_hint->detail)
detail = g_quark_to_string (signal_hint->detail);
@@ -484,8 +491,9 @@ tree_update_children_listener (GSignalInvocationHint *signal_hint,
if (!ATK_IS_OBJECT (child))
{
child = atk_object_ref_accessible_child (accessible, index);
- /* TODO Add debug wrapper */
+#ifdef SPI_ATK_DEBUG
non_owned_accessible (child);
+#endif
}
register_subtree (child);
}
@@ -510,8 +518,10 @@ atk_dbus_initialize (AtkObject *root)
if (!ref2ptr)
ref2ptr = g_hash_table_new(g_direct_hash, g_direct_equal);
+#ifdef SPI_ATK_DEBUG
if (g_thread_supported ())
g_message ("AT-SPI: Threads enabled");
+#endif
register_subtree (root);