[Sugar-devel] [PATCH] Pass the contact-id to the buddy-removed signal instead of the handle #2349

Tomeu Vizoso tomeu.vizoso at collabora.co.uk
Mon Sep 20 08:56:04 EDT 2010


---
 src/jarabe/model/neighborhood.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/jarabe/model/neighborhood.py b/src/jarabe/model/neighborhood.py
index 76a0a7d..9d82db3 100644
--- a/src/jarabe/model/neighborhood.py
+++ b/src/jarabe/model/neighborhood.py
@@ -387,8 +387,9 @@ class _Account(gobject.GObject):
             if handle in self._buddy_handles:
                 presence_type, status_, message_ = presence
                 if presence_type == CONNECTION_PRESENCE_TYPE_OFFLINE:
+                    contact_id = self._buddy_handles[handle]
                     del self._buddy_handles[handle]
-                    self.emit('buddy-removed', handle)
+                    self.emit('buddy-removed', contact_id)
 
     def __buddy_info_updated_cb(self, handle, properties):
         logging.debug('_Account.__buddy_info_updated_cb %r', handle)
-- 
1.7.2.3



More information about the Sugar-devel mailing list