def __init__(self, path, cfgdir): self.path = path wal.Application.__init__(self) UCApplication.__init__(self, path, cfgdir, False) if wal.IS_WINXP: msg = _('WindowsXP platform is obsolete and not supported!') dialogs.error_dialog(self.mw, 'sK1', msg) sys.exit() self.appdata = AppData(self, cfgdir) log_level = config.log_level self.log_filepath = os.path.join(self.appdata.app_config_dir, 'sk1.log') mixutils.config_logging(fsutils.get_sys_path(self.log_filepath), log_level) sys.stderr = StreamLogger() LOG.info('Logging started') wal.SPIN['overlay'] = config.spin_overlay wal.SPIN['sep'] = config.spin_sep plg_dir = os.path.join(self.path, 'share', 'pd_plugins') custom_plg_dir = self.appdata.plugin_dir config.plugin_dirs = [plg_dir, custom_plg_dir] sys.path.insert(1, fsutils.get_sys_path(self.appdata.app_config_dir)) sys.path.insert(1, fsutils.get_sys_path(os.path.join(self.path, 'share'))) config.app = self LOG.info('Config is updated') self.history = AppHistoryManager(self) self.artprovider = create_artprovider() self.cursors = modes.get_cursors() self.proxy = AppProxy(self) self.insp = AppInspector(self) self.plugins = app_plugins.scan_plugins(self) self.actions = app_actions.create_actions(self) self.default_cms = AppColorManager(self) self.palettes = AppPaletteManager(self) self.clipboard = AppClipboard(self) self.mw = AppMainWindow(self) self.mw.set_global_shortcuts(self.actions) self.proxy.update() self.insp.update() LOG.info('Application is initialized') uc2.events.connect(uc2.events.MESSAGES, self.uc2_event_logging) events.connect(events.APP_STATUS, self.sk1_event_logging) self.fsw = AppFileWatcher(self, self.mw) if wal.IS_WX2: events.emit(events.NO_DOCS)
def __init__(self, path, cfgdir='~'): self.path = path wal.Application.__init__(self) UCApplication.__init__(self, path, cfgdir) if wal.IS_WINXP: msg = _('WindowsXP platform is obsolete and not supported!') dialogs.error_dialog(self.mw, 'sK1', msg) sys.exit() self.appdata = AppData(self, cfgdir) config.load(self.appdata.app_config) config.resource_dir = os.path.join(path_unicode(self.path), 'share') log_level = config.log_level self.log_filepath = os.path.join(self.appdata.app_config_dir, 'sk1.log') config_logging(self.log_filepath, log_level) sys.stderr = StreamLogger() LOG.info('Logging started') self.update_wal() plg_dir = os.path.join(self.path, 'share', 'pd_plugins') custom_plg_dir = self.appdata.plugin_dir config.plugin_dirs = [plg_dir, custom_plg_dir] sys.path.insert(1, self.appdata.app_config) sys.path.insert(1, os.path.join(self.path, 'share')) config.app = self LOG.info('Config is updated') self.history = AppHistoryManager(self) self.artprovider = create_artprovider() self.cursors = modes.get_cursors() self.proxy = AppProxy(self) self.insp = AppInspector(self) self.plugins = app_plugins.scan_plugins(self) self.actions = app_actions.create_actions(self) self.default_cms = AppColorManager(self) self.palettes = AppPaletteManager(self) self.clipboard = AppClipboard(self) self.mw = AppMainWindow(self) self.mw.set_global_shortcuts(self.actions) self.proxy.update() self.insp.update() LOG.info('Application is initialized') uc2.events.connect(uc2.events.MESSAGES, self.uc2_event_logging) events.connect(events.APP_STATUS, self.sk1_event_logging) if wal.IS_WX2: events.emit(events.NO_DOCS) if config.make_font_cache_on_start: generate_fcache()
def __init__(self, path, cfgdir='~'): self.path = path wal.Application.__init__(self) UCApplication.__init__(self, path, cfgdir) if wal.is_winxp(): msg = _('WindowsXP platform is obsolete and not supported!') dialogs.error_dialog(self.mw, 'sK1', msg) sys.exit() self.appdata = AppData(self, cfgdir) config.load(self.appdata.app_config) config.resource_dir = os.path.join(path_unicode(self.path), 'share') self.update_wal() plg_dir = os.path.join(self.path, 'share', 'pd_plugins') custom_plg_dir = self.appdata.plugin_dir config.plugin_dirs = [plg_dir, custom_plg_dir] sys.path.insert(1, self.appdata.app_config) sys.path.insert(1, os.path.join(self.path, 'share')) config.app = self self.history = AppHistoryManager(self) self.artprovider = create_artprovider() self.cursors = modes.get_cursors() self.proxy = AppProxy(self) self.insp = AppInspector(self) self.plugins = app_plugins.scan_plugins(self) self.actions = app_actions.create_actions(self) self.default_cms = AppColorManager(self) self.palettes = AppPaletteManager(self) self.clipboard = AppClipboard(self) self.mw = AppMainWindow(self) self.mw.set_global_shortcuts(self.actions) self.proxy.update() self.insp.update() if wal.is_wx2(): events.emit(events.NO_DOCS) if config.make_font_cache_on_start: generate_fcache()
def __init__(self, path, cfgdir='~'): self.path = path wal.Application.__init__(self) UCApplication.__init__(self, path, cfgdir) if wal.is_winxp(): msg = _('WindowsXP platform is obsolete and not supported!') dialogs.error_dialog(self.mw, 'sK1', msg) sys.exit() self.appdata = AppData(self, cfgdir) config.load(self.appdata.app_config) config.resource_dir = os.path.join(path_unicode(self.path), 'share') plg_dir = os.path.join(self.path, 'share', 'pd_plugins') custom_plg_dir = self.appdata.plugin_dir config.plugin_dirs = [plg_dir, custom_plg_dir] sys.path.insert(1, self.appdata.app_config) sys.path.insert(1, os.path.join(self.path, 'share')) config.app = self self.history = AppHistoryManager(self) self.artprovider = create_artprovider() self.cursors = modes.get_cursors() self.proxy = AppProxy(self) self.insp = AppInspector(self) self.plugins = app_plugins.scan_plugins(self) self.actions = app_actions.create_actions(self) self.default_cms = AppColorManager(self) self.palettes = AppPaletteManager(self) self.clipboard = AppClipboard(self) self.mw = AppMainWindow(self) self.mw.set_global_shortcuts(self.actions) self.proxy.update() self.insp.update() if wal.is_wx2(): events.emit(events.NO_DOCS) if config.make_font_cache_on_start: generate_fcache()
def __init__(self, path): self.path = path wal.Application.__init__(self) UCApplication.__init__(self, path) self.appdata = AppData(self) config.load(self.appdata.app_config) config.resource_dir = os.path.join(path_unicode(self.path), 'share') plg_dir = os.path.join(self.path, 'share', 'pd_plugins') custom_plg_dir = self.appdata.plugin_dir config.plugin_dirs = [plg_dir, custom_plg_dir] sys.path.insert(1, self.appdata.app_config) sys.path.insert(1, os.path.join(self.path, 'share')) config.app = self self.history = AppHistoryManager(self) self.artprovider = create_artprovider() self.cursors = modes.get_cursors() self.proxy = AppProxy(self) self.insp = AppInspector(self) self.plugins = app_plugins.scan_plugins(self) self.actions = app_actions.create_actions(self) self.default_cms = AppColorManager(self) self.palettes = AppPaletteManager(self) self.clipboard = AppClipboard(self) self.mw = AppMainWindow(self) self.mw.set_global_shortcuts(self.actions) self.proxy.update() self.insp.update() events.emit(events.NO_DOCS)