From 9c079c190d62a28b1ef514ee2f92aa12fd27db8d Mon Sep 17 00:00:00 2001 From: Athanasius <github@miggy.org> Date: Mon, 16 Aug 2021 14:32:08 +0100 Subject: [PATCH] CAPI: Set up AppWindow handling of <<CAPIResponse>> Tk event --- EDMarketConnector.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/EDMarketConnector.py b/EDMarketConnector.py index 0e6cc95c..447baea7 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -648,7 +648,8 @@ class AppWindow(object): self.w.bind('<FocusOut>', self.onleave) # Special handling for transparency self.w.bind('<Return>', self.getandsend) self.w.bind('<KP_Enter>', self.getandsend) - self.w.bind_all('<<Invoke>>', self.getandsend) # Hotkey monitoring + self.w.bind_all('<<Invoke>>', self.getandsend) # Ask for CAPI queries to be performed + self.w.bind_all('<<CAPIResponse>>', self.capi_handle_response) self.w.bind_all('<<JournalEvent>>', self.journal_event) # Journal monitoring self.w.bind_all('<<DashboardEvent>>', self.dashboard_event) # Dashboard monitoring self.w.bind_all('<<PluginError>>', self.plugin_error) # Statusbar @@ -1089,6 +1090,10 @@ class AppWindow(object): self.suit_show_if_set() self.cooldown() + def capi_handle_response(self, event=None): + """Handle the resulting data from a CAPI query.""" + ... + def journal_event(self, event): # noqa: C901, CCR001 # Currently not easily broken up. """ Handle a Journal event passed through event queue from monitor.py.