[at-spi2-atk] Fix matching attributes on collection interfaces
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-atk] Fix matching attributes on collection interfaces
- Date: Fri, 13 May 2011 17:22:33 +0000 (UTC)
commit 6b5513abf9cd5dd687e986bc6fc7336ad0cf3660
Author: Mike Gorse <mgorse linux-l2tz site>
Date: Fri May 13 19:22:05 2011 +0200
Fix matching attributes on collection interfaces
atk-adaptor/adaptors/collection-adaptor.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/atk-adaptor/adaptors/collection-adaptor.c b/atk-adaptor/adaptors/collection-adaptor.c
index 2cd9a51..f274239 100644
--- a/atk-adaptor/adaptors/collection-adaptor.c
+++ b/atk-adaptor/adaptors/collection-adaptor.c
@@ -397,7 +397,7 @@ match_attributes_any_p (AtkObject * child, AtkAttributeSet * attributes)
AtkAttribute *attr = g_slist_nth_data (attributes, i);
for (k = 0; k < oa_length; k++)
{
- AtkAttribute *oa_attr = g_slist_nth_data (attributes, i);
+ AtkAttribute *oa_attr = g_slist_nth_data (oa, k);
if (!g_ascii_strcasecmp (oa_attr->name, attr->name) &&
!g_ascii_strcasecmp (oa_attr->value, attr->value))
{
@@ -676,14 +676,12 @@ read_mr (DBusMessageIter * iter, MatchRulePrivate * mrp)
const char *key, *val;
dbus_message_iter_recurse (&iter_dict, &iter_dict_entry);
dbus_message_iter_get_basic (&iter_dict_entry, &key);
+ dbus_message_iter_next (&iter_dict_entry);
dbus_message_iter_get_basic (&iter_dict_entry, &val);
attr = g_new (AtkAttribute, 1);
- if (attr)
- {
- attr->name = g_strdup (key);
- attr->value = g_strdup (val);
- mrp->attributes = g_slist_prepend (mrp->attributes, attr);
- }
+ attr->name = g_strdup (key);
+ attr->value = g_strdup (val);
+ mrp->attributes = g_slist_prepend (mrp->attributes, attr);
dbus_message_iter_next (&iter_dict);
}
dbus_message_iter_next (&iter_struct);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]