electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 8cfa32db5c4bc74cd535cecb8ca29bb5c97e9bb3
parent bcb18bbde48768646571d7391be09194423feb61
Author: ThomasV <thomasv@gitorious>
Date:   Mon,  8 Sep 2014 11:45:19 +0200

add labelsChanged signal

Diffstat:
Mgui/qt/main_window.py | 19+++++++++++--------
Mplugins/labels.py | 1+
2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py @@ -114,8 +114,7 @@ class StatusBarButton(QPushButton): default_column_widths = { "history":[40,140,350,140], "contacts":[350,330], "receive": [370,200,130] } class ElectrumWindow(QMainWindow): - - + labelsChanged = pyqtSignal() def __init__(self, config, network, gui_object): QMainWindow.__init__(self) @@ -171,6 +170,7 @@ class ElectrumWindow(QMainWindow): self.connect(self, QtCore.SIGNAL('transaction_signal'), lambda: self.notify_transactions() ) self.connect(self, QtCore.SIGNAL('payment_request_ok'), self.payment_request_ok) self.connect(self, QtCore.SIGNAL('payment_request_error'), self.payment_request_error) + self.labelsChanged.connect(self.update_tabs) self.history_list.setFocus(True) @@ -507,12 +507,15 @@ class ElectrumWindow(QMainWindow): def update_wallet(self): self.update_status() if self.wallet.up_to_date or not self.network or not self.network.is_connected(): - self.update_history_tab() - self.update_receive_tab() - self.update_address_tab() - self.update_contacts_tab() - self.update_completions() - self.update_invoices_tab() + self.update_tabs() + + def update_tabs(self): + self.update_history_tab() + self.update_receive_tab() + self.update_address_tab() + self.update_contacts_tab() + self.update_completions() + self.update_invoices_tab() def create_history_tab(self): diff --git a/plugins/labels.py b/plugins/labels.py @@ -247,3 +247,4 @@ class Plugin(BasePlugin): self.wallet.labels[key] = value self.wallet.storage.put('labels', self.wallet.labels) print_error("received labels") + self.window.labelsChanged.emit()