Fixed bug #517761, Collection match rules not working for attributes.
authorshaeger <shaeger@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Fri, 22 Feb 2008 14:06:05 +0000 (14:06 +0000)
committershaeger <shaeger@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Fri, 22 Feb 2008 14:06:05 +0000 (14:06 +0000)
git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@984 e2bd861d-eb25-0410-b326-f6ed22b6b98c

ChangeLog
libspi/collection.c

index 6e41aad..2058eb1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-02-22  Scott Haeger  <scott@bashautomation.com>
+
+        * libspi/collection.c:
+        Fixed bug #517761, Collection match rules not working for attributes.
+
 2008-02-19  Li Yuan  <li.yuan@sun.com>
 
        Patch from Scott Haeger <scott@bashautomation.com>
index 6b95fa9..0ee5719 100644 (file)
@@ -456,8 +456,10 @@ match_attributes_all_p (Accessibility_Accessible child, Accessibility_AttributeS
 
      for (i = 0; i < attributes->_length; i++){
          for (k = 0; k < oa->_length; k++)
-              if (!g_ascii_strcasecmp (oa->_buffer [k], attributes->_buffer [i]))
+              if (!g_ascii_strcasecmp (oa->_buffer [k], attributes->_buffer [i])){
                    flag = TRUE;
+                    break;
+               }
               else
                    flag = FALSE;
          if (!flag) 
@@ -485,8 +487,6 @@ match_attributes_any_p (Accessibility_Accessible child, Accessibility_AttributeS
      return FALSE;
 }
 
-
-
 static gboolean 
 match_attributes_none_p (Accessibility_Accessible child, Accessibility_AttributeSet  *attributes, CORBA_Environment *ev){
 
@@ -502,18 +502,11 @@ match_attributes_none_p (Accessibility_Accessible child, Accessibility_Attribute
      for (i = 0; i < attributes->_length; i++){
          for (k = 0; k < oa->_length; k++)
               if (!g_ascii_strcasecmp (oa->_buffer [k], attributes->_buffer [i]))
-                   flag = FALSE;
-              else
-                   flag = TRUE;
-         if (flag) 
-              return TRUE; 
+                   return FALSE;
      }
-     return FALSE;
+     return TRUE;
 }
 
-
-
-
 static gboolean
 match_attributes_lookup (Accessibility_Accessible child, MatchRulePrivate *mrp, CORBA_Environment *ev){