electrum

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

commit 19533dda15df28fa80307b2d9c219fb5711af9ad
parent f09d80459d088ab883f5af708f375504d302b27d
Author: ThomasV <thomasv@electrum.org>
Date:   Tue, 24 Nov 2015 12:10:43 +0100

load wallet in ElectrumWindow constructor

Diffstat:
Mgui/qt/__init__.py | 5+----
Mgui/qt/main_window.py | 9+++++----
2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/gui/qt/__init__.py b/gui/qt/__init__.py @@ -201,11 +201,8 @@ class ElectrumGui: wallet = self.load_wallet_file(path) if not wallet: return - w = ElectrumWindow(self.config, self.network, self) + w = ElectrumWindow(self, wallet) w.connect_slots(self.timer) - - # load new wallet in gui - w.load_wallet(wallet) # save path if self.config.get('wallet_path') is None: self.config.set_key('gui_last_wallet', path) diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py @@ -108,13 +108,12 @@ expiration_values = [ class ElectrumWindow(QMainWindow, PrintError): - def __init__(self, config, network, gui_object): + def __init__(self, gui_object, wallet): QMainWindow.__init__(self) - self.config = config - self.network = network - self.wallet = None self.gui_object = gui_object + self.config = config = gui_object.config + self.network = gui_object.network self.invoices = gui_object.invoices self.contacts = gui_object.contacts self.tray = gui_object.tray @@ -178,6 +177,8 @@ class ElectrumWindow(QMainWindow, PrintError): self.fetch_alias() self.require_fee_update = False self.tx_notifications = [] + # load wallet + self.load_wallet(wallet) def diagnostic_name(self): return "%s/%s" % (PrintError.diagnostic_name(self),