[java-atk-wrapper] AtkWrapper: Remove hard-coded handler values



commit 8e0952c1636754c55651ef18b185bd3e9ef2fde0
Author: Magdalen Berns <m berns thismagpie com>
Date:   Wed Jan 7 01:02:04 2015 +0000

    AtkWrapper: Remove hard-coded handler values
    
    For handlers it is para->state_value instead of hard coding TRUE or
    false in the third argument ofatk_object_notify_state_change. This
    is because we cannot be sure whether the state change is on or off.
    
    bug: https://bugzilla.gnome.org/show_bug.cgi?id=742498

 jni/src/AtkWrapper.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/jni/src/AtkWrapper.c b/jni/src/AtkWrapper.c
index f184724..dac74d8 100644
--- a/jni/src/AtkWrapper.c
+++ b/jni/src/AtkWrapper.c
@@ -285,7 +285,7 @@ focus_notify_handler (gpointer p)
   }
 
   AtkObject* atk_obj = ATK_OBJECT(jaw_impl);
-  atk_object_notify_state_change(atk_obj, ATK_STATE_FOCUSED, TRUE);
+  atk_object_notify_state_change(atk_obj, ATK_STATE_FOCUSED, para->state_value);
 
   free_callback_para(para);
 
@@ -978,7 +978,9 @@ component_added_handler (gpointer p)
   AtkObject* atk_obj = ATK_OBJECT(jaw_impl);
   if (atk_object_get_role(atk_obj) == ATK_ROLE_TOOL_TIP)
   {
-    atk_object_notify_state_change(atk_obj, ATK_STATE_SHOWING, 1);
+    atk_object_notify_state_change(atk_obj,
+                                   ATK_STATE_SHOWING,
+                                   para->state_value);
   }
 
   free_callback_para(para);
@@ -1013,7 +1015,9 @@ component_removed_handler (gpointer p)
 
   AtkObject* atk_obj = ATK_OBJECT(jaw_impl);
   if (atk_object_get_role(atk_obj) == ATK_ROLE_TOOL_TIP) {
-    atk_object_notify_state_change(atk_obj, ATK_STATE_SHOWING, 0);
+    atk_object_notify_state_change(atk_obj,
+                                   ATK_STATE_SHOWING,
+                                   para->state_value);
   }
 
   free_callback_para(para);


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