When serializing an activity, allow using the owner's nick name for the service name

This commit is contained in:
Dan Williams 2006-06-19 15:12:24 -04:00
parent 40483bb856
commit e7f9a0a728

View File

@ -143,9 +143,12 @@ class Service(object):
if uid and not self._properties.has_key(_ACTIVITY_UID_TAG): if uid and not self._properties.has_key(_ACTIVITY_UID_TAG):
self._properties[_ACTIVITY_UID_TAG] = uid self._properties[_ACTIVITY_UID_TAG] = uid
def serialize(self): def serialize(self, owner=None):
sdict = {} 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['full_stype'] = dbus.Variant(self._full_stype)
sdict['activity_stype'] = dbus.Variant(self._activity_stype) sdict['activity_stype'] = dbus.Variant(self._activity_stype)
sdict['domain'] = dbus.Variant(self._domain) sdict['domain'] = dbus.Variant(self._domain)