format inputs so that they fit on one line
authorThomasV <thomasv@gitorious>
Thu, 17 Apr 2014 16:08:08 +0000 (18:08 +0200)
committerThomasV <thomasv@gitorious>
Thu, 17 Apr 2014 16:08:08 +0000 (18:08 +0200)
gui/qt/transaction_dialog.py

index b9f775c..c4f498b 100644 (file)
@@ -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)