tminor fixes for payto_edit - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 0673df9176455303ed749777672bcb52d2f18591 DIR parent 7c3d8471e58409d20ec44abd7b3d2ff086b5aad7 HTML Author: ThomasV <thomasv@gitorious> Date: Fri, 6 Jun 2014 07:17:47 +0200 minor fixes for payto_edit Diffstat: M gui/qt/main_window.py | 3 ++- M gui/qt/paytoedit.py | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) --- DIR diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py t@@ -810,7 +810,8 @@ class ElectrumWindow(QMainWindow): confirm_amount = self.config.get('confirm_amount', 100000000) if amount >= confirm_amount: - if not self.question(_("send %(amount)s to %(address)s?")%{ 'amount' : self.format_amount(amount) + ' '+ self.base_unit(), 'address' : to_address}): + o = '\n'.join(map(lambda x:x[0], outputs)) + if not self.question(_("send %(amount)s to %(address)s?")%{ 'amount' : self.format_amount(amount) + ' '+ self.base_unit(), 'address' : o}): return confirm_fee = self.config.get('confirm_fee', 100000) DIR diff --git a/gui/qt/paytoedit.py b/gui/qt/paytoedit.py t@@ -40,6 +40,7 @@ class PayToEdit(QTextEdit): self.setMinimumHeight(27) self.setMaximumHeight(27) self.c = None + self.textChanged.connect(self.check_text) def lock_amount(self): self.amount_edit.setFrozen(True) t@@ -80,12 +81,13 @@ class PayToEdit(QTextEdit): outputs = [] total = 0 + self.payto_address = None + if len(lines) == 1: try: self.payto_address = self.parse_address(lines[0]) except: - self.payto_address = None - + pass if self.payto_address: self.unlock_amount() return t@@ -119,7 +121,7 @@ class PayToEdit(QTextEdit): if self.payto_address: if not bitcoin.is_address(self.payto_address): - QMessageBox.warning(self, _('Error'), _('Invalid Bitcoin Address') + ':\n' + to_address, _('OK')) + QMessageBox.warning(self, _('Error'), _('Invalid Bitcoin Address') + ':\n' + self.payto_address, _('OK')) return try: t@@ -165,7 +167,6 @@ class PayToEdit(QTextEdit): tc.movePosition(QTextCursor.EndOfWord) tc.insertText(completion.right(extra)) self.setTextCursor(tc) - self.check_text() def textUnderCursor(self): t@@ -195,7 +196,6 @@ class PayToEdit(QTextEdit): if not self.c or not isShortcut: QTextEdit.keyPressEvent(self, e) - self.check_text() ctrlOrShift = e.modifiers() and (Qt.ControlModifier or Qt.ShiftModifier)