Exemplo n.º 1
0
	def __init__(self, parent, action):
		self.action = action
		art_id = action.get_artid()
		art_size = wal.DEF_SIZE
		text = ''
		tooltip = action.get_tooltip_text()
		padding = 0
		decoration_padding = 3
		native = True

		if wal.is_msw():
			decoration_padding = 2
			if wal.is_winxp(): native = False

		wal.ImageButton.__init__(self, parent, art_id, art_size, text, tooltip,
							padding, decoration_padding, True, native,
							onclick=action.do_call)
		self.action.register(self)
Exemplo n.º 2
0
    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()
Exemplo n.º 3
0
	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()