Browse Source

kivy: address filter "all"

follow-up of #3841
3.1
SomberNight 7 years ago
parent
commit
3bfaaad774
  1. 7
      gui/kivy/uix/screens.py
  2. 6
      gui/kivy/uix/ui_screens/address.kv

7
gui/kivy/uix/screens.py

@ -522,7 +522,12 @@ class AddressScreen(CScreen):
def update(self):
self.menu_actions = [('Receive', self.do_show), ('Details', self.do_view)]
wallet = self.app.wallet
_list = wallet.get_change_addresses() if self.screen.show_change else wallet.get_receiving_addresses()
if self.screen.show_change == 0:
_list = wallet.get_receiving_addresses()
elif self.screen.show_change == 1:
_list = wallet.get_change_addresses()
else:
_list = wallet.get_addresses()
search = self.screen.message
container = self.screen.ids.search_container
container.clear_widgets()

6
gui/kivy/uix/ui_screens/address.kv

@ -50,7 +50,7 @@ AddressScreen:
name: 'address'
message: ''
pr_status: 'Pending'
show_change: False
show_change: 0
show_used: 0
on_message:
self.parent.update()
@ -70,9 +70,9 @@ AddressScreen:
spacing: '5dp'
AddressButton:
id: search
text: _('Change') if root.show_change else _('Receiving')
text: {0:_('Receiving'), 1:_('Change'), 2:_('All')}[root.show_change]
on_release:
root.show_change = not root.show_change
root.show_change = (root.show_change + 1) % 3
Clock.schedule_once(lambda dt: app.address_screen.update())
AddressFilter:
opacity: 1

Loading…
Cancel
Save