1
0

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:
Neil Booth
2015-09-04 09:12:11 +09:00
parent ec3b7ba5ee
commit 8ce2a95695
4 changed files with 23 additions and 25 deletions

View File

@@ -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 = {}