def init_config(cfgdir='~'): """sK1 config initialization""" global config config = get_app_config() cfg_dir = os.path.expanduser(os.path.join(cfgdir, '.config', 'sk1-wx')) cfg_path = os.path.join(cfg_dir, 'preferences.cfg') config.load(cfg_path) config.resource_dir = os.path.join(__path__[0], 'share')
def init_config(): """sK1 config initialization""" global config config = get_app_config() cfg_dir = os.path.expanduser(os.path.join('~', '.config', 'sk1-wx')) cfg_path = os.path.join(cfg_dir, 'preferences.cfg') config.load(cfg_path) config.resource_dir = os.path.join(__path__[0], 'share')
def init_config(cfgdir='~'): """sK1 config initialization""" cfg_dir = os.path.join(cfgdir, '.config', 'sk1-wx') cfg_file = os.path.join(cfg_dir, 'preferences.cfg') resource_dir = get_utf8_path(os.path.join(__path__[0], 'share')) # Setting locale before app initialization lang = read_locale(cfg_file) lang_path = get_sys_path(os.path.join(resource_dir, 'locales')) _.set_locale('sk1', lang_path, lang) global config from sk1.app_conf import get_app_config config = get_app_config() config.load(cfg_file) config.resource_dir = resource_dir
def sk1_run(): """sK1 application launch routine.""" global config _pkgdir = __path__[0] config = get_app_config(_pkgdir) appdata = AppData() config.load(appdata.app_config) config.resource_dir = os.path.join(_pkgdir, 'share') if config.mw_disable_global_menu: os.environ["UBUNTU_MENUPROXY"] = "0" # os.environ["LIBOVERLAY_SCROLLBAR"] = "0" from sk1.application import Application app = Application(appdata) app.run()