diff options
author | Dan Williams <dcbw@redhat.com> | 2006-06-19 19:12:24 (GMT) |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2006-06-19 19:12:24 (GMT) |
commit | e7f9a0a72827dfdd175d2e25d1472654bcb552b7 (patch) | |
tree | 6613223744aa9dcc0e28865ba80f2d75020cc8f4 /sugar/presence | |
parent | 40483bb8561895241675018f4a7c4a78368b1f24 (diff) |
When serializing an activity, allow using the owner's nick name for the service name
Diffstat (limited to 'sugar/presence')
-rw-r--r-- | sugar/presence/Service.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sugar/presence/Service.py b/sugar/presence/Service.py index e1232f6..e3885ad 100644 --- a/sugar/presence/Service.py +++ b/sugar/presence/Service.py @@ -143,9 +143,12 @@ class Service(object): if uid and not self._properties.has_key(_ACTIVITY_UID_TAG): self._properties[_ACTIVITY_UID_TAG] = uid - def serialize(self): + def serialize(self, owner=None): sdict = {} - sdict['name'] = dbus.Variant(self._name) + if owner is not None: + sdict['name'] = dbus.Variant(owner.get_nick_name()) + else: + sdict['name'] = dbus.Variant(self._name) sdict['full_stype'] = dbus.Variant(self._full_stype) sdict['activity_stype'] = dbus.Variant(self._activity_stype) sdict['domain'] = dbus.Variant(self._domain) |