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)
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)
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)
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)