From b7ea3c5e10f0449131e1ab18f2f6114163c3e67d Mon Sep 17 00:00:00 2001 From: Michael Wozniak Date: Thu, 17 Apr 2014 12:09:36 -0400 Subject: [PATCH] No longer require restart for toggle exchange rate Fixes issue #643 and allows fiat button to work without restart No logic is required because Send tab gets removed and added for every toggle. --- plugins/exchange_rate.py | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/exchange_rate.py b/plugins/exchange_rate.py index cddf5ae..d59b215 100644 --- a/plugins/exchange_rate.py +++ b/plugins/exchange_rate.py @@ -393,11 +393,9 @@ class Plugin(BasePlugin): def toggle(self): out = BasePlugin.toggle(self) self.win.update_status() - if self.config.get('use_exchange_rate'): - 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.")) + self.win.tabs.removeTab(1) + new_send_tab = self.gui.main_window.create_send_tab() + self.win.tabs.insertTab(1, new_send_tab, _('Send')) return out -- 1.7.1