topen each wallet in a separate window - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit ce06d921007bc756578f3ee5b827e0bacf85f618 DIR parent 119aa5bf2e410199a52a9749c5400399637133af HTML Author: ThomasV <thomasv@electrum.org> Date: Tue, 1 Sep 2015 12:16:07 +0200 open each wallet in a separate window Diffstat: M gui/qt/__init__.py | 8 ++++++-- M gui/qt/main_window.py | 12 ++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) --- DIR diff --git a/gui/qt/__init__.py b/gui/qt/__init__.py t@@ -109,8 +109,12 @@ class ElectrumGui: def new_window(self, config): self.app.emit(SIGNAL('new_window'), config) - def start_new_window(self, config): - path = config.get_wallet_path() + def load_wallet_file(self, path): + self.app.emit(SIGNAL('new_window'), self.config, path) + + def start_new_window(self, config, path=None): + if path is None: + path = config.get_wallet_path() for w in self.windows: if w.config.get_wallet_path() == path: break DIR diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py t@@ -141,10 +141,10 @@ class ElectrumWindow(QMainWindow): tabs.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) self.setCentralWidget(tabs) - try: - self.setGeometry(*self.config.get("winpos-qt")) - except: - self.setGeometry(100, 100, 840, 400) + #try: + # self.setGeometry(*self.config.get("winpos-qt")) + #except: + # self.setGeometry(100, 100, 840, 400) if self.config.get("is_maximized"): self.showMaximized() t@@ -293,7 +293,7 @@ class ElectrumWindow(QMainWindow): filename = unicode(QFileDialog.getOpenFileName(self, "Select your wallet file", wallet_folder)) if not filename: return - self.load_wallet_file(filename) + self.gui_object.load_wallet_file(filename) def run_wizard(self, storage, action): import installwizard t@@ -423,7 +423,7 @@ class ElectrumWindow(QMainWindow): for i, k in enumerate(sorted(recent)): b = os.path.basename(k) def loader(k): - return lambda: self.load_wallet_file(k) + return lambda: self.gui_object.load_wallet_file(k) self.recently_visited_menu.addAction(b, loader(k)).setShortcut(QKeySequence("Ctrl+%d"%(i+1))) self.recently_visited_menu.setEnabled(len(recent))