1
0

Exchange rate plugin fixes for multiple windows

This should be enough to keep everything working that was working
before.  The plugin itself needs a lot more work to fix existing
bugs and be sane.
This commit is contained in:
Neil Booth
2015-09-02 20:34:40 +09:00
parent 992c70a688
commit f2fb856f1c
5 changed files with 123 additions and 109 deletions

View File

@@ -201,6 +201,7 @@ class ElectrumGui:
self.start_new_window(self.config, full_path)
def new_window(self, path):
# Use a signal as can be called from daemon thread
self.app.emit(SIGNAL('new_window'), self.config, path)
def start_new_window(self, config, path=None):
@@ -215,6 +216,7 @@ class ElectrumGui:
if not wallet:
return
w = ElectrumWindow(config, self.network, self)
run_hook('new_window', w)
w.connect_slots(self.timer)
# load new wallet in gui

View File

@@ -76,7 +76,7 @@ class HistoryWidget(MyTreeWidget):
self.insertTopLevelItem(0, item)
if current_tx == tx_hash:
self.setCurrentItem(item)
run_hook('history_tab_update')
run_hook('history_tab_update', self.parent)
def update_item(self, tx_hash, conf, timestamp):
icon, time_str = self.get_icon(conf, timestamp)

View File

@@ -1395,7 +1395,7 @@ class ElectrumWindow(QMainWindow):
e.setFrozen(False)
self.set_pay_from([])
self.update_status()
run_hook('do_clear')
run_hook('do_clear', self)
def set_frozen_state(self, addrs, freeze):
self.wallet.set_frozen_state(addrs, freeze)