[Sugar-devel] [PATCH sugar] Set the nick name when the buddy properties changes OLPC #10750
simon at schampijer.de
Sun Jul 24 09:14:19 EDT 2011
On 07/19/2011 06:59 PM, Simon Schampijer wrote:
> On 07/18/2011 10:23 PM, Sascha Silbe wrote:
>> Excerpts from Simon Schampijer's message of Mon Jul 18 19:51:16 +0200
>>> 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'".
>> Acked-By: Sascha Silbe<silbe at activitycentral.com>
>>> @@ -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]
>> How come only the nick name is prefixed by the interface name, but
>> neither 'color' nor 'key'? Is it because they're custom Sugar
>> properties? Should they also be prefixed by an interface name and we're
>> doing something wrong elsewhere?
> When the 'alias' changes  we actually do construct the property using
> the interface name ourself to match the other cases when the properties
> are updated .
> The other keys like 'color or 'key' do come plain as well, the only
> other key which has a prefix is 'contact-id' which has the connection
> prefixed .
> I don't think we do anything wrong here...
>  http://git.sugarlabs.org/sugar/mainline/blobs/master/src/jarabe
Thanks for the review, pushed as:
More information about the Sugar-devel