diff --git a/gui/qt/__init__.py b/gui/qt/__init__.py index eb2fcb8d6..28128d485 100644 --- a/gui/qt/__init__.py +++ b/gui/qt/__init__.py @@ -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 diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py index bca89427a..c6951fbde 100644 --- a/gui/qt/main_window.py +++ b/gui/qt/main_window.py @@ -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() @@ -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 @@ -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))