diff --git a/bin/sugar-activity b/bin/sugar-activity index 2e10922a..c01b2637 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()