From e7f9a0a72827dfdd175d2e25d1472654bcb552b7 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 19 Jun 2006 19:12:24 +0000 Subject: When serializing an activity, allow using the owner's nick name for the service name --- 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) -- cgit v0.9.1