コード例 #1
0
    def on_activated(self, view):
        if is_colorizable(view):
            generate_menu(view)

        state = state_for(view)
        if state and state.theme_path:
            # set file's own theme path, because we use one per css file
            theme.set(state.theme_path)

        if need_colorization(view):
            colorize_file(view, state)

        if need_uncolorization(view):
            uncolorize_file(view, state_for(view))
コード例 #2
0
ファイル: livecolors.py プロジェクト: MarioRicalde/livecss
    def on_activated(self, view):
        if is_colorizable(view):
            generate_menu(view)

        state = state_for(view)
        if state and state.theme_path:
            # set file's own theme path, because we use one per css file
            theme.set(state.theme_path)

        if need_colorization(view):
            colorize_file(view, state)

        if need_uncolorization(view):
            uncolorize_file(view)
コード例 #3
0
ファイル: livecolors.py プロジェクト: bandroidx/livecss
    def on_activated(self, view):
        if is_colorizable(view):
            generate_menu(view)

            # set file's own theme path
            # because we use one per css file
            state = State(view)
            if state.theme_path:
                theme.set(state.theme_path)

        if need_colorization(view):
            colorize_file(view)

        if need_uncolorization(view):
            uncolorize_file(view)