2009-06-08 Mark Doffman <mark.doffman@codethink.co.uk>
authorMark Doffman <mdoff@silver-wind.(none)>
Mon, 8 Jun 2009 10:39:51 +0000 (11:39 +0100)
committerMark Doffman <mdoff@silver-wind.(none)>
Mon, 8 Jun 2009 10:39:51 +0000 (11:39 +0100)
        * pyatspi/accessiblecache.py
          Removing objects fix, incorrectly named variable.
        * pyatspi/base.py
          Enum comparison with None was not correct.
        * registryd/deviceeventcontroller.c
          Un-initialized dbus error in generate-mouse-event function.

pyatspi/accessiblecache.py
pyatspi/base.py
registryd/deviceeventcontroller.c

index 7d199e9..b190793 100644 (file)
@@ -175,7 +175,7 @@ class AccessibleCache(object):
                 for old, new in cache_update_objects:
                         self._dispatch_event(old, new)
 
-        def _remove_object(self, paths):
+        def _remove_object(self, path):
                 # TODO I'm squashing a possible error here
                 # I've seen things appear to be deleted twice
                 # which needs investigation
index 607cf2f..7096d1b 100644 (file)
@@ -47,6 +47,8 @@ class Enum(dbus.UInt32):
                 return self._enum_lookup[int(self)]
 
         def __eq__(self, other):
+                if other is None:
+                        return False
                 if int(self) == int(other):
                         return True
                 else:
index 6b67e78..8049ab0 100644 (file)
@@ -2485,6 +2485,7 @@ static DBusMessage * impl_generate_mouse_event (DBusConnection *bus, DBusMessage
   gboolean err = FALSE;
   Display *display = spi_get_display ();
 
+  dbus_error_init (&error);
   if (!dbus_message_get_args(message, &error, DBUS_TYPE_INT32, &x, DBUS_TYPE_INT32, &y, DBUS_TYPE_STRING, &eventName, DBUS_TYPE_INVALID))
   {
     return droute_invalid_arguments_error (message);