generated from itdominator/Python-With-Gtk-Template
Buffer list updates preview path; cleanup
This commit is contained in:
parent
6e34078099
commit
070d94abc1
|
@ -54,6 +54,12 @@ class BridgeController:
|
|||
event_system.emit(f"handle_file_event_{event.originator}", (event,))
|
||||
case "open_file":
|
||||
event_system.emit(f"handle_file_event_{event.originator}", (event,))
|
||||
case "tggl_search_replace":
|
||||
event_system.emit(f"tggl_search_replace")
|
||||
case "find_entry":
|
||||
event_system.emit(f"find_entry_{event.originator}")
|
||||
case "replace_entry":
|
||||
event_system.emit(f"replace_entry_{event.originator}")
|
||||
case "tggl_top_main_menubar":
|
||||
event_system.emit("tggl_top_main_menubar")
|
||||
case "set_info_labels":
|
||||
|
|
|
@ -53,7 +53,8 @@ class AceEditor(WebKit2.WebView):
|
|||
event_system.subscribe(f"keyboard_scale_up_text_{self.INDEX}", self.keyboard_scale_up_text)
|
||||
event_system.subscribe(f"keyboard_scale_down_text_{self.INDEX}", self.keyboard_scale_down_text)
|
||||
event_system.subscribe(f"toggle_highlight_line_{self.INDEX}", self.toggle_highlight_line)
|
||||
|
||||
event_system.subscribe(f"find_entry_{self.INDEX}", self.find_entry)
|
||||
event_system.subscribe(f"replace_entry_{self.INDEX}", self.replace_entry)
|
||||
event_system.subscribe(f"ui_message_{self.INDEX}", self.ui_message)
|
||||
|
||||
def _load_settings(self):
|
||||
|
@ -125,6 +126,18 @@ class AceEditor(WebKit2.WebView):
|
|||
command = f"displayMessage('{message}', '{mtype}', '3')"
|
||||
self.run_javascript(command, None, None)
|
||||
|
||||
def find_entry(self, query):
|
||||
command = f"findEntry('{query}')"
|
||||
self.run_javascript(command, None, None)
|
||||
|
||||
def replace_entry(self, fromStr, toStr):
|
||||
command = f"replaceEntry('{fromStr}', '{toStr}')"
|
||||
self.run_javascript(command, None, None)
|
||||
|
||||
def replace_all(self, fromStr, toStr):
|
||||
command = f"replaceAll('{fromStr}', '{toStr}')"
|
||||
self.run_javascript(command, None, None)
|
||||
|
||||
def run_javascript(self, script, cancellable, callback):
|
||||
logger.debug(script)
|
||||
super().run_javascript(script, cancellable, callback)
|
||||
|
|
Loading…
Reference in New Issue