commit 7c2ac013063eb1c80ec53cff9c623e4b7681f511
parent 803b292d9d27338e2ac01d1972f6c669aa95b58f
Author: ThomasV <thomasv@gitorious>
Date: Mon, 2 Sep 2013 22:43:58 +0200
plugin hook for load_wallet
Diffstat:
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gui/gui_classic.py b/gui/gui_classic.py
@@ -329,6 +329,8 @@ class ElectrumWindow(QMainWindow):
self.update_buttons_on_seed()
self.update_console()
+ self.run_hook('load_wallet')
+
def select_wallet_file(self):
wallet_folder = self.wallet.storage.path
diff --git a/plugins/pointofsale.py b/plugins/pointofsale.py
@@ -101,12 +101,15 @@ class Plugin(BasePlugin):
def init(self):
self.qr_window = None
- self.requested_amounts = self.config.get('requested_amounts',{})
self.merchant_name = self.config.get('merchant_name', 'Invoice')
self.gui.expert_mode = True
self.gui.receive_list.setHeaderLabels([ _('Address'), _('Label'), _('Balance'), _('Request')])
self.toggle_QR_window(True)
+ self.requested_amounts = {}
+
+ def load_wallet(self):
+ self.requested_amounts = self.gui.wallet.storage.get('requested_amounts',{})
def close(self):
self.gui.receive_list.setHeaderLabels([ _('Address'), _('Label'), _('Balance'), _('Tx')])
@@ -195,7 +198,7 @@ class Plugin(BasePlugin):
currency = currency.upper()
self.requested_amounts[address] = (amount, currency)
- self.gui.wallet.config.set_key('requested_amounts', self.requested_amounts, True)
+ self.gui.wallet.storage.put('requested_amounts', self.requested_amounts, True)
label = self.gui.wallet.labels.get(address)
if label is None: