def start_new_window(self, path, uri): for w in self.windows: if w.wallet.storage.path == path: w.bring_to_top() break else: wallet = self.load_wallet_file(path) if not wallet: return w = ElectrumWindow(self.config, self.network, self) 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) # add to recently visited w.update_recently_visited(path) # initial configuration if self.config.get('hide_gui') is True and self.tray.isVisible(): w.hide() else: w.show() self.windows.append(w) self.build_tray_menu() self.plugins.on_new_window(w) if uri: w.pay_to_URI(uri) return w
def start_new_window(self, path, uri): for w in self.windows: if w.wallet.storage.path == path: w.bring_to_top() break else: wallet = self.load_wallet_file(path) if not wallet: return w = ElectrumWindow(self, wallet) w.connect_slots(self.timer) # add to recently visited w.update_recently_visited(path) # initial configuration if self.config.get("hide_gui") is True and self.tray.isVisible(): w.hide() else: w.show() self.windows.append(w) self.build_tray_menu() run_hook("on_new_window", w) if uri: w.pay_to_URI(uri) return w
def start_new_window(self, path, uri): for w in self.windows: if w.wallet.storage.path == path: w.bring_to_top() break else: wallet = self.load_wallet_file(path) if not wallet: return w = ElectrumWindow(self, wallet) w.connect_slots(self.timer) # add to recently visited w.update_recently_visited(path) # initial configuration if self.config.get('hide_gui') is True and self.tray.isVisible(): w.hide() else: w.show() self.windows.append(w) self.build_tray_menu() run_hook('on_new_window', w) if uri: w.pay_to_URI(uri) return w