Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/model
diff options
context:
space:
mode:
authorDan Williams <dcbw@localhost.localdomain>2006-09-19 17:54:32 (GMT)
committer Dan Williams <dcbw@localhost.localdomain>2006-09-19 17:54:32 (GMT)
commitd0f23744f05d1c91c50ec41938c25919179feb9a (patch)
tree42fbe25d3554770f6f7ebbc39c7db248d8135717 /shell/model
parentb6897cf1c59d27cdd6bc32f273af3533959556b2 (diff)
Use asynchronous service resolution to capture service updates too
Diffstat (limited to 'shell/model')
-rw-r--r--shell/model/Owner.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/shell/model/Owner.py b/shell/model/Owner.py
index 3e77d61..097d9c2 100644
--- a/shell/model/Owner.py
+++ b/shell/model/Owner.py
@@ -9,6 +9,7 @@ import logging
from sugar.p2p import Stream
from sugar.presence import PresenceService
from model.Invites import Invites
+import dbus
PRESENCE_SERVICE_TYPE = "_presence_olpc._tcp"
@@ -70,7 +71,9 @@ class ShellOwner(object):
def __update_advertised_current_activity_cb(self):
self._last_activity_update = time.time()
self._pending_activity_update_timer = None
- logging.debug("*** Updating current activity to %s" % self._pending_activity_update)
+ if self._pending_activity_update:
+ logging.debug("*** Updating current activity to %s" % self._pending_activity_update)
+ self._service.set_published_value('curact', dbus.String(self._pending_activity_update))
return False
def set_current_activity(self, activity_id):