Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-07-12 20:17:57 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-07-12 20:17:57 (GMT)
commit2bbedf988b39c5af35777954444ba54ceba13ecb (patch)
treef3607f074de03e6774a9e8963d485ea4db7dcc1c /sugar
parentd12b780074b05b0abcaf6b3877a9a4047c6e0d0e (diff)
Fix a bunch of bugs, more cleanups
Diffstat (limited to 'sugar')
-rw-r--r--sugar/__installed__.py.in1
-rw-r--r--sugar/__uninstalled__.py1
-rw-r--r--sugar/activity/Activity.py16
-rw-r--r--sugar/env.py3
4 files changed, 8 insertions, 13 deletions
diff --git a/sugar/__installed__.py.in b/sugar/__installed__.py.in
index 1b3a64b..cb8222d 100644
--- a/sugar/__installed__.py.in
+++ b/sugar/__installed__.py.in
@@ -1,2 +1,3 @@
sugar_data_dir = '@prefix@/share/sugar'
+sugar_activity_runner = '@prefix@/bin/sugar-activity'
sugar_activities_dir = '@prefix@/share/sugar/activities'
diff --git a/sugar/__uninstalled__.py b/sugar/__uninstalled__.py
index 6b2e1dd..be5abb4 100644
--- a/sugar/__uninstalled__.py
+++ b/sugar/__uninstalled__.py
@@ -1,4 +1,5 @@
import os
sugar_data_dir = os.path.dirname(os.path.dirname(__file__))
+sugar_activity_runner = os.path.join(sugar_data_dir, 'shell/sugar-activity')
sugar_activities_dir = os.path.join(sugar_data_dir, 'activities')
diff --git a/sugar/activity/Activity.py b/sugar/activity/Activity.py
index c0de8e0..2b16f91 100644
--- a/sugar/activity/Activity.py
+++ b/sugar/activity/Activity.py
@@ -11,7 +11,6 @@ import gtk, gobject
from sugar.LogWriter import LogWriter
from sugar import keybindings
import sugar.util
-import sugar.theme
SHELL_SERVICE_NAME = "caom.redhat.Sugar.Shell"
SHELL_SERVICE_PATH = "/com/redhat/Sugar/Shell"
@@ -83,13 +82,8 @@ def create(activity_name, service = None, args = None):
else:
factory.create()
-def main(activity_name, activity_class):
- """Starts the activity main loop."""
- sugar.theme.setup()
-
- log_writer = LogWriter(activity_name)
- log_writer.start()
-
+def register_factory(activity_name, activity_class):
+ """Register the activity factory."""
factory = ActivityFactory(activity_name, activity_class)
gtk.main()
@@ -98,8 +92,7 @@ class ActivityDbusService(dbus.service.Object):
"""Base dbus service object that each Activity uses to export dbus methods.
The dbus service is separate from the actual Activity object so that we can
- tightly control what stuff passes through print aaaa
- the dbus python bindings."""
+ tightly control what stuff passes through the dbus python bindings."""
_ALLOWED_CALLBACKS = [ON_PUBLISH_CB]
@@ -223,6 +216,3 @@ class Activity(gtk.Window):
def publish(self):
"""Called to request the activity to publish itself on the network."""
pass
-
-if __name__ == "__main__":
- main(sys.argv[1], sys.argv[2])
diff --git a/sugar/env.py b/sugar/env.py
index df1fb30..0d2c249 100644
--- a/sugar/env.py
+++ b/sugar/env.py
@@ -36,3 +36,6 @@ def get_data_dir():
def get_activities_dir():
return sugar_activities_dir
+
+def get_activity_runner():
+ return sugar_activity_runner