Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMike C. Fletcher <mcfletch@raistlin.(none)>2007-04-10 03:56:14 (GMT)
committer Mike C. Fletcher <mcfletch@raistlin.(none)>2007-04-10 03:56:14 (GMT)
commit8302be45446119a66bc832a6129de163879daa73 (patch)
treea9a175bb2ffd4b4bb00355c679cd7487de722268 /shell
parent3f10890319aa00fcefa58380e9971a911c9ec5b0 (diff)
A few more docstrings
Diffstat (limited to 'shell')
-rw-r--r--shell/__init__.py9
-rw-r--r--shell/shellservice.py28
2 files changed, 36 insertions, 1 deletions
diff --git a/shell/__init__.py b/shell/__init__.py
index e69de29..b43c5f8 100644
--- a/shell/__init__.py
+++ b/shell/__init__.py
@@ -0,0 +1,9 @@
+"""OLPC Sugar Graphical "Shell" Interface
+
+Provides the shell-level operations for managing
+the OLPC laptop computers. It interacts heavily
+with (and depends upon) the Sugar UI libraries.
+
+This is a "graphical" shell, the name does not
+refer to a command-line "shell" interface.
+"""
diff --git a/shell/shellservice.py b/shell/shellservice.py
index 62bb4f7..3b42940 100644
--- a/shell/shellservice.py
+++ b/shell/shellservice.py
@@ -1,3 +1,4 @@
+"""D-bus service providing access to the shell's functionality"""
import dbus
from sugar.activity import bundleregistry
@@ -8,7 +9,23 @@ _DBUS_OWNER_INTERFACE = "org.laptop.Shell.Owner"
_DBUS_PATH = "/org/laptop/Shell"
class ShellService(dbus.service.Object):
-
+ """Provides d-bus service to script the shell's operations
+
+ Uses a shell_model object to observe events such as changes to:
+
+ * nickname
+ * colour
+ * icon
+ * currently active activity
+
+ and pass the event off to the methods in the dbus signature.
+
+ Key method here at the moment is add_bundle, which is used to
+ do a run-time registration of a bundle using it's application path.
+
+ XXX At the moment the d-bus service methods do not appear to do
+ anything other than add_bundle
+ """
def __init__(self, shell_model):
self._shell_model = shell_model
@@ -26,6 +43,15 @@ class ShellService(dbus.service.Object):
@dbus.service.method(_DBUS_INTERFACE, in_signature="s", out_signature="b")
def add_bundle(self, bundle_path):
+ """Register the activity bundle with the global registry
+
+ bundle_path -- path to the activity bundle's root directory,
+ that is, the directory with activity/activity.info as a
+ child of the directory.
+
+ The bundleregistry.BundleRegistry is responsible for setting
+ up a set of d-bus service mappings for each available activity.
+ """
registry = bundleregistry.get_registry()
return registry.add_bundle(bundle_path)