PropertyChange fixes
authorMike Gorse <mgorse@novell.com>
Mon, 1 Feb 2010 19:52:25 +0000 (14:52 -0500)
committerMike Gorse <mgorse@novell.com>
Tue, 2 Feb 2010 20:31:21 +0000 (15:31 -0500)
atk-adaptor/bridge.c
atk-adaptor/event.c

index e29314c..574dc09 100644 (file)
@@ -148,6 +148,7 @@ spi_atk_bridge_get_bus (void)
     }
   else
     {
+g_print("dbg: data=%s\n", data);
       bus = dbus_connection_open (data, &error);
       if (!bus)
         {
index 0a523af..9930d2c 100644 (file)
@@ -351,7 +351,7 @@ focus_tracker (AtkObject * accessible)
 
 /*---------------------------------------------------------------------------*/
 
-#define PCHANGE "property_change"
+#define PCHANGE "PropertyChange"
 
 /* 
  * This handler handles the following ATK signals and
@@ -390,21 +390,27 @@ property_event_listener (GSignalInvocationHint * signal_hint,
         emit_event (accessible, ITF_EVENT_OBJECT, PCHANGE, pname, 0, 0,
                     DBUS_TYPE_STRING_AS_STRING, s1, append_basic);
     }
-  if (strcmp (pname, "accessible-description") == 0)
+  else if (strcmp (pname, "accessible-description") == 0)
     {
       s1 = atk_object_get_description (accessible);
       if (s1 != NULL)
         emit_event (accessible, ITF_EVENT_OBJECT, PCHANGE, pname, 0, 0,
                     DBUS_TYPE_STRING_AS_STRING, s1, append_basic);
     }
-  if (strcmp (pname, "accessible-parent") == 0)
+  else if (strcmp (pname, "accessible-parent") == 0)
     {
       otemp = atk_object_get_parent (accessible);
       if (otemp != NULL)
         emit_event (accessible, ITF_EVENT_OBJECT, PCHANGE, pname, 0, 0,
                     "(so)", otemp, append_object);
     }
-  if (strcmp (pname, "accessible-table-summary") == 0)
+  else if (strcmp (pname, "accessible-role") == 0)
+    {
+      dbus_uint32_t role = atk_object_get_role (accessible);
+      emit_event (accessible, ITF_EVENT_OBJECT, PCHANGE, pname, 0, 0,
+                    DBUS_TYPE_UINT32_AS_STRING, role, append_basic);
+    }
+  else if (strcmp (pname, "accessible-table-summary") == 0)
     {
       otemp = atk_table_get_summary (ATK_TABLE (accessible));
       if (otemp != NULL)