Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar
diff options
context:
space:
mode:
authorBert Freudenberg <bert@ubuntu.(none)>2007-06-20 09:52:29 (GMT)
committer Bert Freudenberg <bert@ubuntu.(none)>2007-06-20 09:52:29 (GMT)
commitbd86aee0d4ab8a989ae19a7959e65d563228709a (patch)
treea1896ffc226d80571d2f9bd9bef1a17ca6bf82e2 /sugar
parent9283a5cc806c0c00bb822679a97ef527c3a8bc1b (diff)
use activity_id in service name
- construct service name from activity id instead of X window id - cleanup unused declarations in activityfactory.py - remove obsolete _dbus_name_owner_changed_cb() - see http://dev.laptop.org/ticket/1767 - cleared by marcopg
Diffstat (limited to 'sugar')
-rw-r--r--sugar/activity/activityfactory.py4
-rw-r--r--sugar/activity/activityservice.py17
2 files changed, 7 insertions, 14 deletions
diff --git a/sugar/activity/activityfactory.py b/sugar/activity/activityfactory.py
index 809a74d..2cdf9a1 100644
--- a/sugar/activity/activityfactory.py
+++ b/sugar/activity/activityfactory.py
@@ -26,10 +26,6 @@ from sugar.presence import presenceservice
from sugar.activity.activityhandle import ActivityHandle
from sugar import util
-_ACTIVITY_SERVICE_NAME = "org.laptop.Activity"
-_ACTIVITY_SERVICE_PATH = "/org/laptop/Activity"
-_ACTIVITY_INTERFACE = "org.laptop.Activity"
-
_ACTIVITY_FACTORY_INTERFACE = "org.laptop.ActivityFactory"
def create_activity_id():
diff --git a/sugar/activity/activityservice.py b/sugar/activity/activityservice.py
index f456581..3251177 100644
--- a/sugar/activity/activityservice.py
+++ b/sugar/activity/activityservice.py
@@ -33,24 +33,21 @@ class ActivityService(dbus.service.Object):
def __init__(self, activity):
"""Initialise the service for the given activity
- activity -- sugar.activity.activity.Activity instance,
- must have already bound it's window (i.e. it must
- have already initialised to the point of having
- the X window available).
+ activity -- sugar.activity.activity.Activity instance
- Creates dbus services that use the xid of the activity's
- root window as discriminants among all active services
+ Creates dbus services that use the instance's activity_id
+ as discriminants among all active services
of this type. That is, the services are all available
- as names/paths derived from the xid for the window.
+ as names/paths derived from the instance's activity_id.
The various methods exposed on dbus are just forwarded
to the client Activity object's equally-named methods.
"""
activity.realize()
- xid = activity.window.xid
- service_name = _ACTIVITY_SERVICE_NAME + '%d' % xid
- object_path = _ACTIVITY_SERVICE_PATH + "/%s" % xid
+ activity_id = activity.get_id()
+ service_name = _ACTIVITY_SERVICE_NAME + activity_id
+ object_path = _ACTIVITY_SERVICE_PATH + "/" + activity_id
bus = dbus.SessionBus()
bus_name = dbus.service.BusName(service_name, bus=bus)