From 8b7c3a201cc599e1cccaa496e3d05c12cb26e5a8 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Thu, 17 Apr 2014 18:08:08 +0200 Subject: [PATCH] format inputs so that they fit on one line --- gui/qt/transaction_dialog.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gui/qt/transaction_dialog.py b/gui/qt/transaction_dialog.py index b9f775c6..c4f498b7 100644 --- a/gui/qt/transaction_dialog.py +++ b/gui/qt/transaction_dialog.py @@ -191,7 +191,10 @@ class TxDialog(QDialog): vbox.addWidget(QLabel("LockTime: %d\n" % self.tx.locktime)) vbox.addWidget(QLabel(_("Inputs"))) - lines = map(lambda x: x.get('prevout_hash') + ":%d"%x.get('prevout_n') + u'\t' + "%s"%x.get('address') , self.tx.inputs ) + def format_input(x): + _hash = x.get('prevout_hash') + return _hash[0:16] + '...' + _hash[-8:] + ":%d"%x.get('prevout_n') + u'\t' + "%s"%x.get('address') + lines = map(format_input, self.tx.inputs ) i_text = QTextEdit() i_text.setText('\n'.join(lines)) i_text.setReadOnly(True)