Browse Source

qt Coins tab: reorder columns so that outpoint is first

regtest_lnd
SomberNight 6 years ago
parent
commit
24b0943266
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 14
      electrum/gui/qt/utxo_list.py

14
electrum/gui/qt/utxo_list.py

@ -37,11 +37,11 @@ from .util import MyTreeView, ColorScheme, MONOSPACE_FONT
class UTXOList(MyTreeView): class UTXOList(MyTreeView):
class Columns(IntEnum): class Columns(IntEnum):
ADDRESS = 0 OUTPOINT = 0
LABEL = 1 ADDRESS = 1
AMOUNT = 2 LABEL = 2
HEIGHT = 3 AMOUNT = 3
OUTPOINT = 4 HEIGHT = 4
headers = { headers = {
Columns.ADDRESS: _('Address'), Columns.ADDRESS: _('Address'),
@ -74,11 +74,11 @@ class UTXOList(MyTreeView):
address = x['address'] address = x['address']
height = x.get('height') height = x.get('height')
name = x.get('prevout_hash') + ":%d"%x.get('prevout_n') name = x.get('prevout_hash') + ":%d"%x.get('prevout_n')
name_short = x.get('prevout_hash')[:10] + '...' + ":%d"%x.get('prevout_n') name_short = x.get('prevout_hash')[:16] + '...' + ":%d"%x.get('prevout_n')
self.utxo_dict[name] = x self.utxo_dict[name] = x
label = self.wallet.get_label(x.get('prevout_hash')) label = self.wallet.get_label(x.get('prevout_hash'))
amount = self.parent.format_amount(x['value'], whitespaces=True) amount = self.parent.format_amount(x['value'], whitespaces=True)
labels = [address, label, amount, '%d'%height, name_short] labels = [name_short, address, label, amount, '%d'%height]
utxo_item = [QStandardItem(x) for x in labels] utxo_item = [QStandardItem(x) for x in labels]
self.set_editability(utxo_item) self.set_editability(utxo_item)
utxo_item[self.Columns.ADDRESS].setFont(QFont(MONOSPACE_FONT)) utxo_item[self.Columns.ADDRESS].setFont(QFont(MONOSPACE_FONT))

Loading…
Cancel
Save