From bc3bcc20dcbc6a54d5f499bb363b04119d24422c Mon Sep 17 00:00:00 2001 From: Darrin Daigle Date: Sun, 23 Mar 2014 12:58:42 -0500 Subject: [PATCH 1/2] check to see if fiat button already exists on send tab before telling user they must restart Electrum to see it --- plugins/exchange_rate.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/exchange_rate.py b/plugins/exchange_rate.py index 336168d1..a8f65f28 100644 --- a/plugins/exchange_rate.py +++ b/plugins/exchange_rate.py @@ -337,7 +337,10 @@ class Plugin(BasePlugin): out = BasePlugin.toggle(self) self.win.update_status() if self.config.get('use_exchange_rate'): - self.gui.main_window.show_message("To see fiat amount when sending bitcoin, please restart Electrum to activate the new GUI settings.") + try: + self.fiat_button + except: + self.gui.main_window.show_message("To see fiat amount when sending bitcoin, please restart Electrum to activate the new GUI settings.") return out From 7bfd170ad9c6c53115c221f9d6f01d8f13c8072c Mon Sep 17 00:00:00 2001 From: Darrin Daigle Date: Sun, 23 Mar 2014 13:33:54 -0500 Subject: [PATCH 2/2] check if fiat button exists on send tab before updating its caption with the newly selected fiat currency --- plugins/exchange_rate.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/exchange_rate.py b/plugins/exchange_rate.py index a8f65f28..06a5822a 100644 --- a/plugins/exchange_rate.py +++ b/plugins/exchange_rate.py @@ -430,7 +430,12 @@ class Plugin(BasePlugin): hist_checkbox.setChecked(False) hist_checkbox.setEnabled(False) self.win.update_status() - self.fiat_button.setText(cur_request) + try: + self.fiat_button + except: + pass + else: + self.fiat_button.setText(cur_request) def disable_check(): hist_checkbox.setChecked(False)