1
0

Improved new_window handling.

Remove new_window hook.
Plugin informed of all windows via events when first loaded.
init_qt no longer needed for exchange_rate plugin.
This commit is contained in:
Neil Booth
2015-09-04 09:53:16 +09:00
parent fcc452d7b0
commit 77a029082a
4 changed files with 14 additions and 14 deletions

View File

@@ -35,10 +35,6 @@ class Plugin(BasePlugin):
'Linux': 'libportaudio.so'
}[platform.system()]
@hook
def init_qt(self, gui):
pass
def is_available(self):
return amodem is not None

View File

@@ -171,10 +171,6 @@ class Plugin(BasePlugin):
self.btc_rate = Decimal("0.0")
self.network = None
self.wallet_tx_list = {}
# For mid-session plugin loads
for window in parent.windows:
self.new_window(window)
self.new_wallets([window.wallet for window in parent.windows])
@hook
def set_network(self, network):
@@ -185,14 +181,14 @@ class Plugin(BasePlugin):
if network:
network.add_job(self.exchanger)
@hook
def new_window(self, window):
def on_new_window(self, window):
window.connect(window, SIGNAL("refresh_currencies()"),
window.update_status)
window.fx_fields = {}
self.add_send_edit(window)
self.add_receive_edit(window)
window.update_status()
self.new_wallets([window.wallet])
def close(self):
BasePlugin.close(self)