Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoingui.cpp
Show First 20 Lines • Show All 387 Lines • ▼ Show 20 Lines | #endif // ENABLE_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")); | ||||
m_create_wallet_action = new QAction(tr("Create Wallet..."), this); | m_create_wallet_action = new QAction(tr("Create Wallet..."), this); | ||||
m_create_wallet_action->setEnabled(false); | m_create_wallet_action->setEnabled(false); | ||||
m_create_wallet_action->setStatusTip(tr("Create a new wallet")); | m_create_wallet_action->setStatusTip(tr("Create a new wallet")); | ||||
m_close_all_wallets_action = new QAction(tr("Close All Wallets..."), this); | |||||
m_close_all_wallets_action->setStatusTip(tr("Close all wallets")); | |||||
showHelpMessageAction = new QAction(tr("&Command-line options"), this); | showHelpMessageAction = new QAction(tr("&Command-line options"), this); | ||||
showHelpMessageAction->setMenuRole(QAction::NoRole); | showHelpMessageAction->setMenuRole(QAction::NoRole); | ||||
showHelpMessageAction->setStatusTip( | showHelpMessageAction->setStatusTip( | ||||
tr("Show the %1 help message to get a list with possible Bitcoin " | tr("Show the %1 help message to get a list with possible Bitcoin " | ||||
"command-line options") | "command-line options") | ||||
.arg(PACKAGE_NAME)); | .arg(PACKAGE_NAME)); | ||||
m_mask_values_action = new QAction(tr("&Mask values"), this); | m_mask_values_action = new QAction(tr("&Mask values"), this); | ||||
▲ Show 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | if (walletFrame) { | ||||
auto activity = new CreateWalletActivity( | auto activity = new CreateWalletActivity( | ||||
m_wallet_controller, this, this->config->GetChainParams()); | m_wallet_controller, this, this->config->GetChainParams()); | ||||
connect(activity, &CreateWalletActivity::created, this, | connect(activity, &CreateWalletActivity::created, this, | ||||
&BitcoinGUI::setCurrentWallet); | &BitcoinGUI::setCurrentWallet); | ||||
connect(activity, &CreateWalletActivity::finished, activity, | connect(activity, &CreateWalletActivity::finished, activity, | ||||
&QObject::deleteLater); | &QObject::deleteLater); | ||||
activity->create(); | activity->create(); | ||||
}); | }); | ||||
connect(m_close_all_wallets_action, &QAction::triggered, | |||||
[this] { m_wallet_controller->closeAllWallets(this); }); | |||||
connect(m_mask_values_action, &QAction::toggled, this, | connect(m_mask_values_action, &QAction::toggled, this, | ||||
&BitcoinGUI::setPrivacy); | &BitcoinGUI::setPrivacy); | ||||
} | } | ||||
#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, | ||||
&BitcoinGUI::showDebugWindowActivateConsole); | &BitcoinGUI::showDebugWindowActivateConsole); | ||||
Show All 12 Lines | |||||
#endif | #endif | ||||
// Configure the menus | // Configure the menus | ||||
QMenu *file = appMenuBar->addMenu(tr("&File")); | QMenu *file = appMenuBar->addMenu(tr("&File")); | ||||
if (walletFrame) { | if (walletFrame) { | ||||
file->addAction(m_create_wallet_action); | file->addAction(m_create_wallet_action); | ||||
file->addAction(m_open_wallet_action); | file->addAction(m_open_wallet_action); | ||||
file->addAction(m_close_wallet_action); | file->addAction(m_close_wallet_action); | ||||
file->addAction(m_close_all_wallets_action); | |||||
file->addSeparator(); | file->addSeparator(); | ||||
file->addAction(openAction); | file->addAction(openAction); | ||||
file->addAction(backupWalletAction); | file->addAction(backupWalletAction); | ||||
file->addAction(signMessageAction); | file->addAction(signMessageAction); | ||||
file->addAction(verifyMessageAction); | file->addAction(verifyMessageAction); | ||||
file->addAction(m_load_psbt_action); | file->addAction(m_load_psbt_action); | ||||
file->addSeparator(); | file->addSeparator(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 289 Lines • ▼ Show 20 Lines | void BitcoinGUI::setWalletActionsEnabled(bool enabled) { | ||||
backupWalletAction->setEnabled(enabled); | backupWalletAction->setEnabled(enabled); | ||||
changePassphraseAction->setEnabled(enabled); | changePassphraseAction->setEnabled(enabled); | ||||
signMessageAction->setEnabled(enabled); | signMessageAction->setEnabled(enabled); | ||||
verifyMessageAction->setEnabled(enabled); | verifyMessageAction->setEnabled(enabled); | ||||
usedSendingAddressesAction->setEnabled(enabled); | usedSendingAddressesAction->setEnabled(enabled); | ||||
usedReceivingAddressesAction->setEnabled(enabled); | usedReceivingAddressesAction->setEnabled(enabled); | ||||
openAction->setEnabled(enabled); | openAction->setEnabled(enabled); | ||||
m_close_wallet_action->setEnabled(enabled); | m_close_wallet_action->setEnabled(enabled); | ||||
m_close_all_wallets_action->setEnabled(enabled); | |||||
} | } | ||||
void BitcoinGUI::createTrayIcon() { | void BitcoinGUI::createTrayIcon() { | ||||
assert(QSystemTrayIcon::isSystemTrayAvailable()); | assert(QSystemTrayIcon::isSystemTrayAvailable()); | ||||
#ifndef Q_OS_MAC | #ifndef Q_OS_MAC | ||||
if (QSystemTrayIcon::isSystemTrayAvailable()) { | if (QSystemTrayIcon::isSystemTrayAvailable()) { | ||||
trayIcon = | trayIcon = | ||||
▲ Show 20 Lines • Show All 805 Lines • Show Last 20 Lines |