URI: 
       tadd tx details to utxo tab - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit a4149bf6b80282f93d51f1c98f2e1376c2009576
   DIR parent 1457a869d39e2281d226686869cde6c18d44c1e3
  HTML Author: ThomasV <thomasv@electrum.org>
       Date:   Wed, 19 Jul 2017 18:44:28 +0200
       
       add tx details to utxo tab
       
       Diffstat:
         M gui/qt/utxo_list.py                 |      12 +++++++++---
       
       1 file changed, 9 insertions(+), 3 deletions(-)
       ---
   DIR diff --git a/gui/qt/utxo_list.py b/gui/qt/utxo_list.py
       t@@ -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):
       t@@ -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'))
       t@@ -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))