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
def start_new_window(self, config): path = config.get_wallet_path() if path not in self.windows: w = ElectrumWindow(config, self.network, self) w.connect_slots(self.timer) w.load_wallet_file(path) w.show() self.windows[path] = w w = self.windows[path] url = config.get('url') if url: w.pay_to_URI(url) return w
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: w.bring_to_top() break else: w = ElectrumWindow(config, self.network, self) w.connect_slots(self.timer) w.load_wallet_file(path) w.show() self.windows.append(w) url = config.get('url') if url: w.pay_to_URI(url) return w
def main(self, url): storage = WalletStorage(self.config) if not storage.file_exists: import installwizard wizard = installwizard.InstallWizard(self.config, self.network, storage) wallet = wizard.run() if not wallet: exit() else: wallet = Wallet(storage) wallet.start_threads(self.network) s = Timer() s.start() w = ElectrumWindow(self.config, self.network, self.minimize) w.load_wallet(wallet) self.windows.append(w) if url: w.set_url(url) w.app = self.app w.connect_slots(s) w.update_wallet() self.expert = w self.mini = self.init_lite(wallet, w, url) if self.config.get('lite_mode'): if not self.mini: QMessageBox.warning(None,"Could not start Lite GUI.", "Electrum was unable to load the 'Lite GUI' because it needs Qt version >= 4.7.\nChanging your config to use the 'Classic' GUI") self.config.set_key('lite_mode', False, True) sys.exit(0) else: self.minimize() else: w.show() if self.mini: self.mini.hide() self.app.exec_() wallet.stop_threads()