Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/bin/sugar-activity
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sugar-activity')
-rwxr-xr-xbin/sugar-activity22
1 files changed, 11 insertions, 11 deletions
diff --git a/bin/sugar-activity b/bin/sugar-activity
index 2e10922..c01b263 100755
--- a/bin/sugar-activity
+++ b/bin/sugar-activity
@@ -94,6 +94,17 @@ if len(args) == 0:
bundle_path = os.environ['SUGAR_BUNDLE_PATH']
sys.path.append(bundle_path)
+bundle = ActivityBundle(bundle_path)
+
+os.environ['SUGAR_BUNDLE_ID'] = bundle.get_bundle_id()
+os.environ['SUGAR_BUNDLE_NAME'] = bundle.get_name()
+
+gtk.icon_theme_get_default().append_search_path(bundle.get_icons_path())
+
+gettext.bindtextdomain(bundle.get_bundle_id(),
+ bundle.get_locale_path())
+gettext.textdomain(bundle.get_bundle_id())
+
splitted_module = args[0].rsplit('.', 1)
module_name = splitted_module[0]
class_name = splitted_module[1]
@@ -133,17 +144,6 @@ if options.single_process is True:
if hasattr(module, 'start'):
module.start()
-bundle = ActivityBundle(bundle_path)
-
-os.environ['SUGAR_BUNDLE_ID'] = bundle.get_bundle_id()
-os.environ['SUGAR_BUNDLE_NAME'] = bundle.get_name()
-
-gettext.bindtextdomain(bundle.get_bundle_id(),
- bundle.get_locale_path())
-gettext.textdomain(bundle.get_bundle_id())
-
-gtk.icon_theme_get_default().append_search_path(bundle.get_icons_path())
-
create_activity_instance(constructor, handle)
gtk.main()