Merge pull request #422 from thgh/master
Old addresses on receive tab grayed out
This commit is contained in:
commit
8b5f5fc89b
|
@ -1173,7 +1173,7 @@ class ElectrumWindow(QMainWindow):
|
||||||
menu.exec_(self.contacts_list.viewport().mapToGlobal(position))
|
menu.exec_(self.contacts_list.viewport().mapToGlobal(position))
|
||||||
|
|
||||||
|
|
||||||
def update_receive_item(self, item):
|
def update_receive_item(self, item, num_tx = 0):
|
||||||
item.setFont(0, QFont(MONOSPACE_FONT))
|
item.setFont(0, QFont(MONOSPACE_FONT))
|
||||||
address = str(item.data(0,0).toString())
|
address = str(item.data(0,0).toString())
|
||||||
label = self.wallet.labels.get(address,'')
|
label = self.wallet.labels.get(address,'')
|
||||||
|
@ -1188,7 +1188,12 @@ class ElectrumWindow(QMainWindow):
|
||||||
balance = self.format_amount(c + u)
|
balance = self.format_amount(c + u)
|
||||||
item.setData(2,0,balance)
|
item.setData(2,0,balance)
|
||||||
|
|
||||||
if address in self.wallet.frozen_addresses:
|
if (num_tx > 1) and (c == -u):
|
||||||
|
item.setForeground(0,QColor('lightgray'))
|
||||||
|
item.setForeground(1,QColor('gray'))
|
||||||
|
item.setForeground(2,QColor('gray'))
|
||||||
|
item.setForeground(3,QColor('gray'))
|
||||||
|
elif address in self.wallet.frozen_addresses:
|
||||||
item.setBackgroundColor(0, QColor('lightblue'))
|
item.setBackgroundColor(0, QColor('lightblue'))
|
||||||
elif address in self.wallet.prioritized_addresses:
|
elif address in self.wallet.prioritized_addresses:
|
||||||
item.setBackgroundColor(0, QColor('lightgreen'))
|
item.setBackgroundColor(0, QColor('lightgreen'))
|
||||||
|
@ -1243,7 +1248,7 @@ class ElectrumWindow(QMainWindow):
|
||||||
|
|
||||||
num_tx = '*' if h == ['*'] else "%d"%len(h)
|
num_tx = '*' if h == ['*'] else "%d"%len(h)
|
||||||
item = QTreeWidgetItem( [ address, '', '', num_tx] )
|
item = QTreeWidgetItem( [ address, '', '', num_tx] )
|
||||||
self.update_receive_item(item)
|
self.update_receive_item(item, len(h))
|
||||||
if is_red:
|
if is_red:
|
||||||
item.setBackgroundColor(1, QColor('red'))
|
item.setBackgroundColor(1, QColor('red'))
|
||||||
seq_item.addChild(item)
|
seq_item.addChild(item)
|
||||||
|
|
Loading…
Reference in New Issue