kivy: various small fixes
This commit is contained in:
@@ -205,8 +205,7 @@ class SendScreen(CScreen):
|
||||
self.screen.message = uri.get('message', '')
|
||||
amount = uri.get('amount')
|
||||
if amount:
|
||||
amount_str = str( Decimal(amount) / pow(10, self.app.decimal_point()))
|
||||
self.screen.amount = amount_str + ' ' + self.app.base_unit
|
||||
self.screen.amount = self.format_amount_and_units(amount)
|
||||
|
||||
def update(self):
|
||||
if self.app.current_invoice:
|
||||
@@ -221,7 +220,7 @@ class SendScreen(CScreen):
|
||||
def set_request(self, pr):
|
||||
self.payment_request = pr
|
||||
self.screen.address = pr.get_requestor()
|
||||
self.screen.amount = self.app.format_amount(pr.get_amount())
|
||||
self.screen.amount = self.app.format_amount_and_units(pr.get_amount())
|
||||
self.screen.message = pr.get_memo()
|
||||
|
||||
def do_paste(self):
|
||||
@@ -289,8 +288,7 @@ class ReceiveScreen(CScreen):
|
||||
req = self.app.wallet.receive_requests.get(addr)
|
||||
if req:
|
||||
self.screen.message = req.get('memo')
|
||||
self.screen.amount = self.app.format_amount(req.get('amount')) + ' ' + self.app.base_unit
|
||||
|
||||
self.screen.amount = self.app.format_amount_and_units(req.get('amount'))
|
||||
|
||||
def amount_callback(self, popup):
|
||||
amount_label = self.screen.ids.get('amount')
|
||||
@@ -378,7 +376,7 @@ class InvoicesScreen(CScreen):
|
||||
ci.key = pr.get_id()
|
||||
ci.requestor = pr.get_requestor()
|
||||
ci.memo = pr.memo
|
||||
ci.amount = self.app.format_amount(pr.get_amount())
|
||||
ci.amount = self.app.format_amount_and_units(pr.get_amount())
|
||||
#ci.status = self.invoices.get_status(key)
|
||||
exp = pr.get_expiration_date()
|
||||
ci.date = format_time(exp) if exp else _('Never')
|
||||
@@ -413,7 +411,7 @@ class RequestsScreen(CScreen):
|
||||
ci.address = req['address']
|
||||
ci.memo = req.get('memo', '')
|
||||
#ci.status = req.get('status')
|
||||
ci.amount = self.app.format_amount(amount) if amount else ''
|
||||
ci.amount = self.app.format_amount_and_units(amount) if amount else ''
|
||||
ci.date = format_time(timestamp)
|
||||
ci.screen = self
|
||||
requests_list.add_widget(ci)
|
||||
|
||||
@@ -32,10 +32,10 @@ SendScreen:
|
||||
size_hint: None, None
|
||||
size: '22dp', '22dp'
|
||||
pos_hint: {'center_y': .5}
|
||||
TextInputBlue:
|
||||
AmountButton:
|
||||
id: payto_e
|
||||
text: s.address
|
||||
hint_text: "Recipient"
|
||||
text: s.address if s.address else _('Recipient')
|
||||
on_release: app.address_dialog(s)
|
||||
CardSeparator:
|
||||
opacity: message_selection.opacity
|
||||
color: blue_bottom.foreground_color
|
||||
@@ -49,7 +49,7 @@ SendScreen:
|
||||
pos_hint: {'center_y': .5}
|
||||
AmountButton:
|
||||
id: amount_e
|
||||
text: s.amount if s.amount else 'Amount'
|
||||
text: s.amount if s.amount else _('Amount')
|
||||
on_release: app.amount_dialog(s, True)
|
||||
|
||||
CardSeparator:
|
||||
@@ -68,7 +68,7 @@ SendScreen:
|
||||
pos_hint: {'center_y': .5}
|
||||
TextInputBlue:
|
||||
id: message_e
|
||||
hint_text: 'Description'
|
||||
hint_text: _('Description')
|
||||
text: s.message
|
||||
on_text_validate: s.message = self.text
|
||||
BoxLayout:
|
||||
|
||||
Reference in New Issue
Block a user