electrum

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

commit a4149bf6b80282f93d51f1c98f2e1376c2009576
parent 1457a869d39e2281d226686869cde6c18d44c1e3
Author: ThomasV <thomasv@electrum.org>
Date:   Wed, 19 Jul 2017 18:44:28 +0200

add tx details to utxo tab

Diffstat:
Mgui/qt/utxo_list.py | 12+++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/gui/qt/utxo_list.py b/gui/qt/utxo_list.py @@ -32,7 +32,7 @@ class UTXOList(MyTreeWidget): filter_columns = [0, 2] # Address, Label def __init__(self, parent=None): - MyTreeWidget.__init__(self, parent, self.create_menu, [ _('Address'), _('Output point'), _('Label'), _('Amount'), _('Height')], 2) + MyTreeWidget.__init__(self, parent, self.create_menu, [ _('Address'), _('Label'), _('Amount'), _('Height'), _('Output point')], 1) self.setSelectionMode(QAbstractItemView.ExtendedSelection) def get_name(self, x): @@ -49,9 +49,9 @@ class UTXOList(MyTreeWidget): name = self.get_name(x) label = self.wallet.get_label(x.get('prevout_hash')) amount = self.parent.format_amount(x['value']) - utxo_item = QTreeWidgetItem([address, name[0:10] + '...' + name[-2:], label, amount, '%d'%height]) + utxo_item = QTreeWidgetItem([address, label, amount, '%d'%height, name[0:10] + '...' + name[-2:]]) utxo_item.setFont(0, QFont(MONOSPACE_FONT)) - utxo_item.setFont(1, QFont(MONOSPACE_FONT)) + utxo_item.setFont(4, QFont(MONOSPACE_FONT)) utxo_item.setData(0, Qt.UserRole, name) if self.wallet.is_frozen(address): utxo_item.setBackgroundColor(0, QColor('lightblue')) @@ -63,5 +63,11 @@ class UTXOList(MyTreeWidget): return menu = QMenu() coins = filter(lambda x: self.get_name(x) in selected, self.utxos) + menu.addAction(_("Spend"), lambda: self.parent.spend_coins(coins)) + if len(selected) == 1: + txid = selected[0].split(':')[0] + tx = self.wallet.transactions.get(txid) + menu.addAction(_("Details"), lambda: self.parent.show_transaction(tx)) + menu.exec_(self.viewport().mapToGlobal(position))