format inputs so that they fit on one line

This commit is contained in:
ThomasV 2014-04-17 18:08:08 +02:00
parent 80a988e337
commit 8b7c3a201c
1 changed files with 4 additions and 1 deletions

View 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)