Refactor plugin event API: rename message* to emit* and requests_ui_element to request_ui_element

This commit is contained in:
2026-02-28 19:48:41 -06:00
parent 72fcccc8a9
commit a52d5243ab
32 changed files with 208 additions and 90 deletions

View File

@@ -37,17 +37,17 @@ class Plugin(PluginCode):
)
def load(self):
footer = self.requests_ui_element("footer-container")
footer = self.request_ui_element("footer-container")
footer.add( search_replace )
event = Event_Factory.create_event("register_command",
command_name = "search_replace",
command = Handler,
binding_mode = "released",
binding = "<Control>f"
binding = ["<Control>f", "<Control>r"]
)
self.message_to("source_views", event)
self.emit_to("source_views", event)
def run(self):
...
@@ -62,4 +62,5 @@ class Handler:
):
logger.debug("Command: Search/Replace")
search_replace.last_key = args[0]
search_replace.hide() if search_replace.is_visible() else search_replace.show()