electrum

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

commit f4dfec4565af18094e2626f4b0ba174cabf330e1
parent c742e8c5cff5b89893939488c65942ea8e5a9a6c
Author: ThomasV <thomasv@gitorious>
Date:   Tue, 24 Jun 2014 17:44:31 +0200

define frozen signal for exchange rate plugin

Diffstat:
Mgui/qt/amountedit.py | 2++
Mgui/qt/main_window.py | 1+
Mgui/qt/paytoedit.py | 2++
Mplugins/exchange_rate.py | 1+
4 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/gui/qt/amountedit.py b/gui/qt/amountedit.py @@ -6,10 +6,12 @@ from PyQt4.QtGui import * from decimal import Decimal class MyLineEdit(QLineEdit): + frozen = pyqtSignal() def setFrozen(self, b): self.setReadOnly(b) self.setFrame(not b) + self.frozen.emit() class AmountEdit(MyLineEdit): diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py @@ -872,6 +872,7 @@ class ElectrumWindow(QMainWindow): fee = self.wallet.estimated_fee(inputs, 1) amount = total - fee self.amount_e.setAmount(amount) + self.amount_e.textEdited.emit("") self.fee_e.setAmount(fee) return diff --git a/gui/qt/paytoedit.py b/gui/qt/paytoedit.py @@ -123,6 +123,8 @@ class PayToEdit(QRTextEdit): else: self.amount_edit.setText("") + self.amount_edit.textEdited.emit("") + if total or len(lines)>1: self.lock_amount() else: diff --git a/plugins/exchange_rate.py b/plugins/exchange_rate.py @@ -661,4 +661,5 @@ class Plugin(BasePlugin): if fiat_amount is not None: self.fiat_e.setText("%.2f"%fiat_amount) self.btc_e.textEdited.connect(btc_changed) + self.btc_e.frozen.connect(lambda: self.fiat_e.setFrozen(self.btc_e.isReadOnly())) self.win.send_grid.addWidget(self.fiat_e, 4, 3, Qt.AlignHCenter)