Browse Source
qt addresses list: add "funded or unused" filter option
patch-4
Chris
5 years ago
committed by
SomberNight
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
1 changed files with
4 additions and
0 deletions
-
electrum/gui/qt/address_list.py
|
|
@ -43,6 +43,7 @@ class AddressUsageStateFilter(IntEnum): |
|
|
|
UNUSED = 1 |
|
|
|
FUNDED = 2 |
|
|
|
USED_AND_EMPTY = 3 |
|
|
|
FUNDED_OR_UNUSED = 4 |
|
|
|
|
|
|
|
def ui_text(self) -> str: |
|
|
|
return { |
|
|
@ -50,6 +51,7 @@ class AddressUsageStateFilter(IntEnum): |
|
|
|
self.UNUSED: _('Unused'), |
|
|
|
self.FUNDED: _('Funded'), |
|
|
|
self.USED_AND_EMPTY: _('Used'), |
|
|
|
self.FUNDED_OR_UNUSED: _('Funded or Unused'), |
|
|
|
}[self] |
|
|
|
|
|
|
|
|
|
|
@ -173,6 +175,8 @@ class AddressList(MyTreeView): |
|
|
|
continue |
|
|
|
if self.show_used == AddressUsageStateFilter.USED_AND_EMPTY and not is_used_and_empty: |
|
|
|
continue |
|
|
|
if self.show_used == AddressUsageStateFilter.FUNDED_OR_UNUSED and is_used_and_empty: |
|
|
|
continue |
|
|
|
balance_text = self.parent.format_amount(balance, whitespaces=True) |
|
|
|
# create item |
|
|
|
if fx and fx.get_fiat_address_config(): |
|
|
|