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,8 +143,11 @@ 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 = {}
if owner is not None:
sdict['name'] = dbus.Variant(owner.get_nick_name())
else:
sdict['name'] = dbus.Variant(self._name) 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)