[at-spi2-core] Update cache in response to role change notifications



commit a3b7c7d33a3f8fce93f252b1c205a792c1a73727
Author: Mike Gorse <mgorse suse com>
Date:   Fri Oct 5 17:40:55 2012 -0400

    Update cache in response to role change notifications
    
    We update the cache in response to name, description, and parent
    property-change signals, but we were missing code to handle signals for
    role changes.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=685469

 atspi/atspi-event-listener.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/atspi/atspi-event-listener.c b/atspi/atspi-event-listener.c
index 6e70318..26f1105 100644
--- a/atspi/atspi-event-listener.c
+++ b/atspi/atspi-event-listener.c
@@ -270,6 +270,18 @@ cache_process_property_change (AtspiEvent *event)
       event->source->cached_properties &= ~ATSPI_CACHE_DESCRIPTION;
     }
   }
+  else if (!strcmp (event->type, "object:property-change:accessible-role"))
+  {
+    if (G_VALUE_HOLDS_INT (&event->any_data))
+    {
+      event->source->role = g_value_get_int (&event->any_data);
+      _atspi_accessible_add_cache (event->source, ATSPI_CACHE_ROLE);
+    }
+    else
+    {
+      event->source->cached_properties &= ~ATSPI_CACHE_ROLE;
+    }
+  }
 }
 
 static void



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