Have plugins object track the window set
No need for self.gui nor init_qt hook any more. This makes plugins more independent of window and gui types.
This commit is contained in:
@@ -39,6 +39,7 @@ class Plugins:
|
||||
self.pathname = None
|
||||
|
||||
self.plugins = {}
|
||||
self.windows = []
|
||||
self.descriptions = plugins.descriptions
|
||||
for item in self.descriptions:
|
||||
name = item['name']
|
||||
@@ -114,6 +115,12 @@ class Plugins:
|
||||
x += (lambda: self.wallet_plugin_loader(config, name),)
|
||||
wallet.wallet_types.append(x)
|
||||
|
||||
def on_new_window(self, window):
|
||||
self.windows.append(window)
|
||||
|
||||
def on_close_window(self, window):
|
||||
self.windows.remove(window)
|
||||
|
||||
hook_names = set()
|
||||
hooks = {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user