thide fee if there's no amount - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 9325f47543d799a623d1cd76f496b46f910fc421 DIR parent 0ac3ac8d610b0a60858b6a30ccf15dea5f7909a2 HTML Author: ThomasV <thomasv@gitorious> Date: Wed, 7 Dec 2011 22:11:35 +0100 hide fee if there's no amount Diffstat: M client/gui.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- DIR diff --git a/client/gui.py b/client/gui.py t@@ -45,7 +45,7 @@ def numbify(entry, is_int = False): try: amount = int( Decimal(s) * 100000000 ) except: - amount = 0 + amount = None entry.set_text(s) return amount t@@ -587,6 +587,8 @@ class BitcoinGUI: amount = numbify(amount_entry) fee = numbify(fee_entry) if not is_fee: fee = None + if amount is None: + self.fee_box.hide(); return inputs, total, fee = self.wallet.choose_tx_inputs( amount, fee ) if not is_fee: fee_entry.set_text( str( Decimal( fee ) / 100000000 ) ) t@@ -595,6 +597,7 @@ class BitcoinGUI: amount_entry.modify_text(gtk.STATE_NORMAL, gtk.gdk.color_parse("#000000")) fee_entry.modify_text(gtk.STATE_NORMAL, gtk.gdk.color_parse("#000000")) send_button.set_sensitive(True) + self.error = '' else: send_button.set_sensitive(False) amount_entry.modify_text(gtk.STATE_NORMAL, gtk.gdk.color_parse("#cc0000"))