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-09-10 13:26:47 (GMT)
committer Simon McVittie <simon.mcvittie@collabora.co.uk>2007-09-10 13:26:47 (GMT)
commit5703431facf7fea1839c9f2a7424d2e49d32e613 (patch)
tree56b8abc8ae88a1371736c39a99ba1273e8a7cfb2
parent0bfd05c2663b66a2d36585394aaeb0d44d01e6c8 (diff)
parent7b3428886baa8f5c33daa0622446c1e47039d140 (diff)
Merge branch 'master' of git+ssh://dev.laptop.org/git/projects/presence-service
-rw-r--r--NEWS5
-rw-r--r--src/activity.py2
-rw-r--r--src/buddy.py5
3 files changed, 10 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 9f2ee29..eaa7c37 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+Snapshot 3b1f4a0c42
+
+* #3147: Set _PROP_CURACT to current activity when sharing an activity
+ or joining (morgs)
+
Snapshot a79f7b6488
* Fix non-ASCII activity names (smcv)
diff --git a/src/activity.py b/src/activity.py
index 7dc59dc..c5f951c 100644
--- a/src/activity.py
+++ b/src/activity.py
@@ -720,6 +720,8 @@ class Activity(ExportedGObject):
if self._join_is_sharing:
self.send_properties()
self._ps.owner.add_activity(self)
+ else:
+ self._ps.owner.set_properties({'current-activity': self.props.id})
self._join_cb()
_logger.debug("%s of activity %s succeeded" % (verb, self._id))
except Exception, e:
diff --git a/src/buddy.py b/src/buddy.py
index 322ae02..23f0f64 100644
--- a/src/buddy.py
+++ b/src/buddy.py
@@ -437,6 +437,7 @@ class Buddy(ExportedGObject):
"""Join or leave the activity when its validity changes"""
if valid:
self.JoinedActivity(activity.object_path())
+ self.set_properties({_PROP_CURACT: activity.props.id})
else:
self.LeftActivity(activity.object_path())
@@ -584,7 +585,7 @@ class Buddy(ExportedGObject):
def update_current_activity(self, tp, current_activity):
"""Update the current activity from the given Telepathy connection.
"""
- self.set_properties({'current-activity': current_activity})
+ self.set_properties({_PROP_CURACT: current_activity})
def update_avatar(self, tp, new_avatar_token, icon=None, mime_type=None):
"""Handle update of the avatar"""
@@ -674,6 +675,7 @@ class GenericOwner(Buddy):
del id_to_act[activity_id]
self._set_self_activities(tp)
+ self.set_properties({_PROP_CURACT: None})
def _set_self_activities(self, tp):
"""Forward set of joined activities to network
@@ -1008,4 +1010,3 @@ class ShellOwner(GenericOwner):
activity_id = None
props = {_PROP_CURACT: activity_id}
self.set_properties(props)
-