diff options
author | Mike C. Fletcher <mcfletch@raistlin.(none)> | 2007-04-10 02:47:37 (GMT) |
---|---|---|
committer | Mike C. Fletcher <mcfletch@raistlin.(none)> | 2007-04-10 02:47:37 (GMT) |
commit | 3f10890319aa00fcefa58380e9971a911c9ec5b0 (patch) | |
tree | 25e2889a740e36fe776b083a250d15585d32a463 /sugar/activity/activityservice.py | |
parent | 508a59b99bf06bd6c3294a296ee014b5636bbd35 (diff) |
Docstrings for modules all over sugar and shell.
These are just the doc strings I created as I was spelunking
through to see how Sugar manages launching applications. The
resulting auto-documentation is neither polished or finished,
but it should help people reading the code somewhat.
There are a few minor code cleanups:
* activityhandle (replacing C idiom for initialisation with
a Python one)
* bundle registry (using a parameterised directory name so
that it shows up in the documentation)
* validate_activity_id function, use isinstance( item, (str,unicode))
for the query, rather than two separate checks with isinstance
Diffstat (limited to 'sugar/activity/activityservice.py')
-rw-r--r-- | sugar/activity/activityservice.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sugar/activity/activityservice.py b/sugar/activity/activityservice.py index bff42fa..e5b8956 100644 --- a/sugar/activity/activityservice.py +++ b/sugar/activity/activityservice.py @@ -29,6 +29,21 @@ class ActivityService(dbus.service.Object): tightly control what stuff passes through the dbus python bindings.""" 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). + + Creates dbus services that use the xid of the activity's + root window 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. + + The various methods exposed on dbus are just forwarded + to the client Activity object's equally-named methods. + """ xid = activity.window.xid service_name = _ACTIVITY_SERVICE_NAME + '%d' % xid object_path = _ACTIVITY_SERVICE_PATH + "/%s" % xid |