#5512 import the activity module later.
This commit is contained in:
parent
c14abfb022
commit
b7e0ccbf81
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user