diff options
author | Mike Gorse <mgorse@suse.com> | 2014-02-01 17:39:34 -0600 |
---|---|---|
committer | Mike Gorse <mgorse@suse.com> | 2014-02-01 17:39:34 -0600 |
commit | 6395af932862454ed292d3623c18c59218ecbe7e (patch) | |
tree | 2ec4836e29c31d9fd79768ee19bcc04e5abb8903 /atspi/atspi-matchrule.c | |
parent | 2554a07c0bbee7defef5b2fca3a420d6cf42a770 (diff) | |
download | at-spi2-core-6395af932862454ed292d3623c18c59218ecbe7e.tar.gz |
Allow caching of data sent with events and requesting such data
Add atspi_event_listener_register_full, to request that particular data
be sent with an event, and cache the data for the duration of the event
callback.
This also extends the D-Bus protocol, adding an a{sv} to an event to send
this data along, but we will still read events without this array added for
backwards compatibility (and compatibilllity with QT-AT-SPI, which does not
send this data for now).
https://bugzilla.gnome.org/show_bug.cgi?id=708695
Diffstat (limited to 'atspi/atspi-matchrule.c')
-rw-r--r-- | atspi/atspi-matchrule.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/atspi/atspi-matchrule.c b/atspi/atspi-matchrule.c index 1a17cf33..8abeb130 100644 --- a/atspi/atspi-matchrule.c +++ b/atspi/atspi-matchrule.c @@ -122,9 +122,6 @@ atspi_match_rule_new (AtspiStateSet *states, AtspiMatchRule *rule = g_object_new (ATSPI_TYPE_MATCH_RULE, NULL); int i; - if (!rule) - return NULL; - if (states) rule->states = g_object_ref (states); rule->statematchtype = statematchtype; @@ -219,7 +216,8 @@ _atspi_match_rule_marshal (AtspiMatchRule *rule, DBusMessageIter *iter) if (!dbus_message_iter_open_container (&iter_struct, DBUS_TYPE_ARRAY, "{ss}", &iter_dict)) return FALSE; - g_hash_table_foreach (rule->attributes, append_entry, &iter_dict); + if (rule->attributes) + g_hash_table_foreach (rule->attributes, append_entry, &iter_dict); dbus_message_iter_close_container (&iter_struct, &iter_dict); dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_INT32, &d_attributematchtype); |