kivy: minor fixes
This commit is contained in:
parent
43b78ab0e1
commit
b68e3608c9
|
@ -681,6 +681,14 @@ class ElectrumWindow(App):
|
||||||
d = TxDialog(self, tx)
|
d = TxDialog(self, tx)
|
||||||
d.open()
|
d.open()
|
||||||
|
|
||||||
|
def broadcast(self, tx):
|
||||||
|
if self.network and self.network.is_connected():
|
||||||
|
self.show_info(_('Sending'))
|
||||||
|
ok, txid = self.wallet.sendtx(self.tx)
|
||||||
|
self.show_info(txid)
|
||||||
|
else:
|
||||||
|
self.show_info(_('Cannot broadcast transaction') + '\n' + _('Not connected'))
|
||||||
|
|
||||||
def address_dialog(self, screen):
|
def address_dialog(self, screen):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
@ -61,15 +61,15 @@ Builder.load_string('''
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
orientation: 'vertical' if self.width < self.height else 'horizontal'
|
orientation: 'vertical' if self.width < self.height else 'horizontal'
|
||||||
padding:
|
padding:
|
||||||
min(dp(42), self.width/16), min(dp(60), self.height/16),\
|
min(dp(27), self.width/32), min(dp(27), self.height/32),\
|
||||||
min(dp(42), self.width/16), min(dp(72), self.height/16)
|
min(dp(27), self.width/32), min(dp(27), self.height/32)
|
||||||
spacing: '27dp'
|
spacing: '10dp'
|
||||||
GridLayout:
|
GridLayout:
|
||||||
id: grid_logo
|
id: grid_logo
|
||||||
cols: 1
|
cols: 1
|
||||||
pos_hint: {'center_y': .5}
|
pos_hint: {'center_y': .5}
|
||||||
size_hint: 1, None
|
size_hint: 1, None
|
||||||
#height: self.minimum_height
|
height: self.minimum_height
|
||||||
Label:
|
Label:
|
||||||
color: root.text_color
|
color: root.text_color
|
||||||
text: 'ELECTRUM'
|
text: 'ELECTRUM'
|
||||||
|
|
|
@ -154,9 +154,7 @@ class TxDialog(Factory.Popup):
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
def do_broadcast(self):
|
def do_broadcast(self):
|
||||||
self.app.show_info(_('Broadcasting'))
|
self.app.broadcast(self.tx)
|
||||||
ok, txid = self.app.wallet.sendtx(self.tx)
|
|
||||||
self.app.show_info(txid)
|
|
||||||
|
|
||||||
def show_qr(self):
|
def show_qr(self):
|
||||||
from electrum.bitcoin import base_encode
|
from electrum.bitcoin import base_encode
|
||||||
|
|
|
@ -301,9 +301,7 @@ class SendScreen(CScreen):
|
||||||
self.app.tx_dialog(tx)
|
self.app.tx_dialog(tx)
|
||||||
return
|
return
|
||||||
# broadcast
|
# broadcast
|
||||||
self.app.show_info("Sending...")
|
self.app.broadcast(tx)
|
||||||
ok, txid = self.app.wallet.sendtx(tx)
|
|
||||||
self.app.show_info(txid)
|
|
||||||
|
|
||||||
|
|
||||||
class ReceiveScreen(CScreen):
|
class ReceiveScreen(CScreen):
|
||||||
|
|
Loading…
Reference in New Issue