From e7f9a0a72827dfdd175d2e25d1472654bcb552b7 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 19 Jun 2006 15:12:24 -0400 Subject: [PATCH] When serializing an activity, allow using the owner's nick name for the service name --- sugar/presence/Service.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sugar/presence/Service.py b/sugar/presence/Service.py index e1232f68..e3885adc 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)