diff options
author | Morgan Collett <morgan.collett@gmail.com> | 2007-07-03 12:22:30 (GMT) |
---|---|---|
committer | Morgan Collett <morgan.collett@gmail.com> | 2007-07-11 08:38:15 (GMT) |
commit | 66983f0d24b71a2798018873f5c509def40f0e0e (patch) | |
tree | f05b596bf33ad1c01c188b24e060f5fea36b16aa /sugar/presence | |
parent | aa6a02436859df3d2d803d945a94d1cdd4b77772 (diff) |
sugar/presence/activity.py: make Activity.leave call the PS
Needed to make buddy-left work
Diffstat (limited to 'sugar/presence')
-rw-r--r-- | sugar/presence/activity.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sugar/presence/activity.py b/sugar/presence/activity.py index 3681f91..2df8793 100644 --- a/sugar/presence/activity.py +++ b/sugar/presence/activity.py @@ -166,6 +166,17 @@ class Activity(gobject.GObject): (bus_name, connection, channels) = self._activity.GetChannels() return bus_name, connection, channels + def _leave_cb(self): + # XXX Is this the right thing to do? + self.emit("joined", False, "left activity") + + def _leave_error_cb(self, err): + # XXX We are closing down anyway + pass + def leave(self): + """Leave this shared activity""" # FIXME self._joined = False + self._activity.Leave(reply_handler=self._leave_cb, + error_handler=self._leave_error_cb) |