[Sugar-devel] [PATCH sugar] Set the nick name when the buddy properties changes OLPC #10750

Simon Schampijer simon at schampijer.de
Mon Jul 18 13:51:16 EDT 2011


We do get the correct nick information but we did not update
the buddy because of checking for a wrong property key. I checked
that in all the cases (alias-change or when we do get the buddy
information in various ways) the key is
"CONNECTION_INTERFACE_ALIASING + '/alias'".

Signed-off-by: Simon Schampijer <simon at laptop.org>
---
 src/jarabe/model/neighborhood.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/jarabe/model/neighborhood.py b/src/jarabe/model/neighborhood.py
index 7004283..828cb14 100644
--- a/src/jarabe/model/neighborhood.py
+++ b/src/jarabe/model/neighborhood.py
@@ -929,8 +929,9 @@ class Neighborhood(gobject.GObject):
         if 'key' in properties:
             buddy.props.key = properties['key']
 
-        if 'nick' in properties:
-            buddy.props.nick = properties['nick']
+        nick_key = CONNECTION_INTERFACE_ALIASING + '/alias'
+        if nick_key in properties:
+            buddy.props.nick = properties[nick_key]
 
         if is_new:
             self.emit('buddy-added', buddy)
-- 
1.7.4.4



More information about the Sugar-devel mailing list