|
|
|
@ -6,6 +6,7 @@
|
|
|
|
|
|
|
|
|
|
#include <qt/bitcoinunits.h>
|
|
|
|
|
#include <qt/clientmodel.h>
|
|
|
|
|
#include <qt/createwalletdialog.h>
|
|
|
|
|
#include <qt/guiconstants.h>
|
|
|
|
|
#include <qt/guiutil.h>
|
|
|
|
|
#include <qt/modaloverlay.h>
|
|
|
|
@ -339,6 +340,9 @@ void BitcoinGUI::createActions()
|
|
|
|
|
m_close_wallet_action = new QAction(tr("Close Wallet..."), this);
|
|
|
|
|
m_close_wallet_action->setStatusTip(tr("Close wallet"));
|
|
|
|
|
|
|
|
|
|
m_create_wallet_action = new QAction(tr("Create Wallet..."), this);
|
|
|
|
|
m_create_wallet_action->setStatusTip(tr("Create a new wallet"));
|
|
|
|
|
|
|
|
|
|
showHelpMessageAction = new QAction(tr("&Command-line options"), this);
|
|
|
|
|
showHelpMessageAction->setMenuRole(QAction::NoRole);
|
|
|
|
|
showHelpMessageAction->setStatusTip(tr("Show the %1 help message to get a list with possible Bitcoin command-line options").arg(PACKAGE_NAME));
|
|
|
|
@ -394,6 +398,12 @@ void BitcoinGUI::createActions()
|
|
|
|
|
connect(m_close_wallet_action, &QAction::triggered, [this] {
|
|
|
|
|
m_wallet_controller->closeWallet(walletFrame->currentWalletModel(), this);
|
|
|
|
|
});
|
|
|
|
|
connect(m_create_wallet_action, &QAction::triggered, [this] {
|
|
|
|
|
auto activity = new CreateWalletActivity(m_wallet_controller, this);
|
|
|
|
|
connect(activity, &CreateWalletActivity::created, this, &BitcoinGUI::setCurrentWallet);
|
|
|
|
|
connect(activity, &CreateWalletActivity::finished, activity, &QObject::deleteLater);
|
|
|
|
|
activity->create();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
#endif // ENABLE_WALLET
|
|
|
|
|
|
|
|
|
@ -415,6 +425,7 @@ void BitcoinGUI::createMenuBar()
|
|
|
|
|
QMenu *file = appMenuBar->addMenu(tr("&File"));
|
|
|
|
|
if(walletFrame)
|
|
|
|
|
{
|
|
|
|
|
file->addAction(m_create_wallet_action);
|
|
|
|
|
file->addAction(m_open_wallet_action);
|
|
|
|
|
file->addAction(m_close_wallet_action);
|
|
|
|
|
file->addSeparator();
|
|
|
|
|