Ejemplo n.º 1
0
    def history(self, wnd):
        hist = kaa.app.config.hist('pyconsole_script', self.MAX_HISTORY)
        scripts = [p for p, i in hist.get()]
        if not scripts:
            return

        def callback(text):
            if text:
                self._put_script(wnd, text)

        from kaa.ui.texthist import texthistmode
        texthistmode.show_history('Search history:', callback, scripts)
Ejemplo n.º 2
0
    def history(self, wnd):
        hist = kaa.app.config.hist('pyconsole_script', self.MAX_HISTORY)
        scripts = [p for p, i in hist.get()]
        if not scripts:
            return

        def callback(text):
            if text:
                self._put_script(wnd, text)

        from kaa.ui.texthist import texthistmode
        texthistmode.show_history('Search history:', callback, scripts)
Ejemplo n.º 3
0
    def clipboard_history(self, wnd):
        words = list(kaa.app.clipboard.get_all())
        if not words:
            return

        def callback(text):
            if text:
                wnd.document.mode.put_string(wnd, text)
                wnd.screen.selection.clear()
                kaa.app.clipboard.set(text)

        from kaa.ui.texthist import texthistmode
        texthistmode.show_history('Search clipboard text:', callback, words)
Ejemplo n.º 4
0
    def clipboard_history(self, wnd):
        words = list(kaa.app.clipboard.get_all())
        if not words:
            return

        def callback(text):
            if text:
                wnd.document.mode.put_string(wnd, text)
                wnd.screen.selection.clear()
                kaa.app.clipboard.set(text)

        from kaa.ui.texthist import texthistmode
        texthistmode.show_history('Search clipboard text:', callback, words)