electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit b68e3608c9afb0f9f32497ae776ceac30a757e7e
parent 43b78ab0e1bccbf9050db8248265e3ee6e76759a
Author: ThomasV <thomasv@electrum.org>
Date:   Thu, 18 Feb 2016 18:52:49 +0100

kivy: minor fixes

Diffstat:
Mgui/kivy/main_window.py | 8++++++++
Mgui/kivy/uix/dialogs/create_restore.py | 8++++----
Mgui/kivy/uix/dialogs/tx_dialog.py | 4+---
Mgui/kivy/uix/screens.py | 4+---
4 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py @@ -681,6 +681,14 @@ class ElectrumWindow(App): d = TxDialog(self, tx) 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): pass diff --git a/gui/kivy/uix/dialogs/create_restore.py b/gui/kivy/uix/dialogs/create_restore.py @@ -61,15 +61,15 @@ Builder.load_string(''' BoxLayout: orientation: 'vertical' if self.width < self.height else 'horizontal' padding: - min(dp(42), self.width/16), min(dp(60), self.height/16),\ - min(dp(42), self.width/16), min(dp(72), self.height/16) - spacing: '27dp' + min(dp(27), self.width/32), min(dp(27), self.height/32),\ + min(dp(27), self.width/32), min(dp(27), self.height/32) + spacing: '10dp' GridLayout: id: grid_logo cols: 1 pos_hint: {'center_y': .5} size_hint: 1, None - #height: self.minimum_height + height: self.minimum_height Label: color: root.text_color text: 'ELECTRUM' diff --git a/gui/kivy/uix/dialogs/tx_dialog.py b/gui/kivy/uix/dialogs/tx_dialog.py @@ -154,9 +154,7 @@ class TxDialog(Factory.Popup): self.update() def do_broadcast(self): - self.app.show_info(_('Broadcasting')) - ok, txid = self.app.wallet.sendtx(self.tx) - self.app.show_info(txid) + self.app.broadcast(self.tx) def show_qr(self): from electrum.bitcoin import base_encode diff --git a/gui/kivy/uix/screens.py b/gui/kivy/uix/screens.py @@ -301,9 +301,7 @@ class SendScreen(CScreen): self.app.tx_dialog(tx) return # broadcast - self.app.show_info("Sending...") - ok, txid = self.app.wallet.sendtx(tx) - self.app.show_info(txid) + self.app.broadcast(tx) class ReceiveScreen(CScreen):