Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoingui.cpp
Show First 20 Lines • Show All 389 Lines • ▼ Show 20 Lines | #endif // ENABLE_WALLET | ||||
openAction = new QAction(platformStyle->TextColorIcon(":/icons/open"), | openAction = new QAction(platformStyle->TextColorIcon(":/icons/open"), | ||||
tr("Open &URI..."), this); | tr("Open &URI..."), this); | ||||
openAction->setStatusTip( | openAction->setStatusTip( | ||||
tr("Open a %1: URI or payment request") | tr("Open a %1: URI or payment request") | ||||
.arg(QString::fromStdString( | .arg(QString::fromStdString( | ||||
config->GetChainParams().CashAddrPrefix()))); | config->GetChainParams().CashAddrPrefix()))); | ||||
m_open_wallet_action = new QAction(tr("Open Wallet"), this); | m_open_wallet_action = new QAction(tr("Open Wallet"), this); | ||||
m_open_wallet_action->setMenu(new QMenu(this)); | m_open_wallet_action->setEnabled(false); | ||||
m_open_wallet_action->setStatusTip(tr("Open a wallet")); | m_open_wallet_action->setStatusTip(tr("Open a wallet")); | ||||
m_close_wallet_action = new QAction(tr("Close Wallet..."), this); | m_close_wallet_action = new QAction(tr("Close Wallet..."), this); | ||||
m_close_wallet_action->setStatusTip(tr("Close wallet")); | m_close_wallet_action->setStatusTip(tr("Close wallet")); | ||||
showHelpMessageAction = | showHelpMessageAction = | ||||
new QAction(platformStyle->TextColorIcon(":/icons/info"), | new QAction(platformStyle->TextColorIcon(":/icons/info"), | ||||
tr("&Command-line options"), this); | tr("&Command-line options"), this); | ||||
▲ Show 20 Lines • Show All 271 Lines • ▼ Show 20 Lines | |||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
void BitcoinGUI::setWalletController(WalletController *wallet_controller) { | void BitcoinGUI::setWalletController(WalletController *wallet_controller) { | ||||
assert(!m_wallet_controller); | assert(!m_wallet_controller); | ||||
assert(wallet_controller); | assert(wallet_controller); | ||||
m_wallet_controller = wallet_controller; | m_wallet_controller = wallet_controller; | ||||
m_open_wallet_action->setEnabled(true); | |||||
m_open_wallet_action->setMenu(new QMenu(this)); | |||||
connect(wallet_controller, &WalletController::walletAdded, this, | connect(wallet_controller, &WalletController::walletAdded, this, | ||||
&BitcoinGUI::addWallet); | &BitcoinGUI::addWallet); | ||||
connect(wallet_controller, &WalletController::walletRemoved, this, | connect(wallet_controller, &WalletController::walletRemoved, this, | ||||
&BitcoinGUI::removeWallet); | &BitcoinGUI::removeWallet); | ||||
for (WalletModel *wallet_model : m_wallet_controller->getWallets()) { | for (WalletModel *wallet_model : m_wallet_controller->getWallets()) { | ||||
addWallet(wallet_model); | addWallet(wallet_model); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 861 Lines • Show Last 20 Lines |