Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2007-06-07 16:16:05 (GMT)
committer Simon McVittie <simon.mcvittie@collabora.co.uk>2007-06-07 16:16:05 (GMT)
commit232fa0828a8265cd51edcc0825c2f4201a80f0a8 (patch)
tree92efa88eb23e3c7c6f3a605345dd262b5b948e08
parent7cb953920669e47334d63c370d35fdfe625c12e6 (diff)
activity: get Owner object from the PS rather than as a parameter
-rw-r--r--src/activity.py6
-rw-r--r--src/presenceservice.py6
2 files changed, 7 insertions, 5 deletions
diff --git a/src/activity.py b/src/activity.py
index 714a6a7..c54b58c 100644
--- a/src/activity.py
+++ b/src/activity.py
@@ -496,7 +496,7 @@ class Activity(ExportedGObject):
return True
- def _share(self, async_cb, async_err_cb, owner):
+ def _share(self, async_cb, async_err_cb):
"""XXX - not documented yet
XXX - This method is called externally by the PresenceService
@@ -510,7 +510,6 @@ class Activity(ExportedGObject):
sigid = self._tp.connect('activity-shared', self._joined_cb)
self._tp.share_activity(self.props.id, (sigid, async_cb,
async_err_cb, True))
- self._owner = owner
_logger.debug("done with share attempt %s" % self._id)
def _joined_cb(self, tp, activity_id, room_handle, text_channel, exc,
@@ -535,8 +534,7 @@ class Activity(ExportedGObject):
self._handle_share_join(tp, text_channel)
if am_sharing:
self.send_properties()
- assert self._owner is not None
- self._owner.add_activity(self)
+ self._ps.owner.add_activity(self)
async_cb(dbus.ObjectPath(self._object_path))
_logger.debug("%s of activity %s succeeded" % (verb, self._id))
diff --git a/src/presenceservice.py b/src/presenceservice.py
index ee188fe..9aefe1a 100644
--- a/src/presenceservice.py
+++ b/src/presenceservice.py
@@ -133,6 +133,10 @@ class PresenceService(ExportedGObject):
self._bus_name = dbus.service.BusName(_PRESENCE_SERVICE,
bus=self._session_bus)
+ @property
+ def owner(self):
+ return self._owner
+
def _connection_disconnected_cb(self, foo=None):
"""Log event when D-Bus kicks us off the bus for some reason"""
_logger.debug("Disconnected from session bus!!!")
@@ -477,7 +481,7 @@ class PresenceService(ExportedGObject):
activity.connect("validity-changed",
self._activity_validity_changed_cb)
self._activities[actid] = activity
- activity._share(async_cb, async_err_cb, self._owner)
+ activity._share(async_cb, async_err_cb)
# local activities are valid at creation by definition, but we can't
# connect to the activity's validity-changed signal until its already