From b7e0ccbf81a7eb503bf8521d7896622920a1aeb4 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Wed, 19 Dec 2007 20:03:25 +0100 Subject: [PATCH] #5512 import the activity module later. --- bin/sugar-activity | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) 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()