tadd labelsChanged signal - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 8cfa32db5c4bc74cd535cecb8ca29bb5c97e9bb3 DIR parent bcb18bbde48768646571d7391be09194423feb61 HTML Author: ThomasV <thomasv@gitorious> Date: Mon, 8 Sep 2014 11:45:19 +0200 add labelsChanged signal Diffstat: M gui/qt/main_window.py | 19 +++++++++++-------- M plugins/labels.py | 1 + 2 files changed, 12 insertions(+), 8 deletions(-) --- DIR diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py t@@ -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) t@@ -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) t@@ -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): DIR diff --git a/plugins/labels.py b/plugins/labels.py t@@ -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()