| 332 | } |
| 333 | |
| 334 | void OpenWalletActivity::open(const std::string& path) |
| 335 | { |
| 336 | QString name = path.empty() ? QString("["+tr("default wallet")+"]") : QString::fromStdString(path); |
| 337 | |
| 338 | showProgressDialog( |
| 339 | //: Title of window indicating the progress of opening of a wallet. |
| 340 | tr("Open Wallet"), |
| 341 | /*: Descriptive text of the open wallet progress window which indicates |
| 342 | to the user which wallet is currently being opened. */ |
| 343 | tr("Opening Wallet <b>%1</b>…").arg(name.toHtmlEscaped())); |
| 344 | |
| 345 | QTimer::singleShot(0, worker(), [this, path] { |
| 346 | std::unique_ptr<interfaces::Wallet> wallet = node().walletLoader().loadWallet(path, m_error_message, m_warning_message); |
| 347 | |
| 348 | if (wallet) m_wallet_model = m_wallet_controller->getOrCreateWallet(std::move(wallet)); |
| 349 | |
| 350 | QTimer::singleShot(0, this, &OpenWalletActivity::finish); |
| 351 | }); |
| 352 | } |
| 353 | |
| 354 | LoadWalletsActivity::LoadWalletsActivity(WalletController* wallet_controller, QWidget* parent_widget) |
| 355 | : WalletControllerActivity(wallet_controller, parent_widget) |
no test coverage detected