Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoingui.cpp
Show First 20 Lines • Show All 447 Lines • ▼ Show 20 Lines | if (walletFrame) { | ||||
m_open_wallet_action->menu()->clear(); | m_open_wallet_action->menu()->clear(); | ||||
for (std::string path : | for (std::string path : | ||||
m_wallet_controller->getWalletsAvailableToOpen()) { | m_wallet_controller->getWalletsAvailableToOpen()) { | ||||
QString name = path.empty() | QString name = path.empty() | ||||
? QString("[" + tr("default wallet") + "]") | ? QString("[" + tr("default wallet") + "]") | ||||
: QString::fromStdString(path); | : QString::fromStdString(path); | ||||
QAction *action = m_open_wallet_action->menu()->addAction(name); | QAction *action = m_open_wallet_action->menu()->addAction(name); | ||||
connect(action, &QAction::triggered, [this, path] { | connect(action, &QAction::triggered, [this, path] { | ||||
setCurrentWallet(m_wallet_controller->openWallet( | OpenWalletActivity *activity = | ||||
config->GetChainParams(), path)); | m_wallet_controller->openWallet( | ||||
config->GetChainParams(), path); | |||||
connect(activity, &OpenWalletActivity::opened, this, | |||||
&BitcoinGUI::setCurrentWallet); | |||||
connect(activity, &OpenWalletActivity::finished, activity, | |||||
&QObject::deleteLater); | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
} | } | ||||
#endif // ENABLE_WALLET | #endif // ENABLE_WALLET | ||||
connect(new QShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_C), this), | connect(new QShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_C), this), | ||||
&QShortcut::activated, this, | &QShortcut::activated, this, | ||||
▲ Show 20 Lines • Show All 1,036 Lines • Show Last 20 Lines |