@@ -338,6 +338,9 @@ void BitcoinGUI::createActions()
338
338
m_open_wallet_action->setMenu (new QMenu (this ));
339
339
m_open_wallet_action->setStatusTip (tr (" Open a wallet" ));
340
340
341
+ m_close_wallet_action = new QAction (tr (" Close Wallet..." ), this );
342
+ m_close_wallet_action->setStatusTip (tr (" Close wallet" ));
343
+
341
344
showHelpMessageAction = new QAction (platformStyle->TextColorIcon (" :/icons/info" ), tr (" &Command-line options" ), this );
342
345
showHelpMessageAction->setMenuRole (QAction::NoRole);
343
346
showHelpMessageAction->setStatusTip (tr (" Show the %1 help message to get a list with possible Bitcoin command-line options" ).arg (tr (PACKAGE_NAME)));
@@ -396,6 +399,9 @@ void BitcoinGUI::createActions()
396
399
});
397
400
}
398
401
});
402
+ connect (m_close_wallet_action, &QAction::triggered, [this ] {
403
+ m_wallet_controller->closeWallet (walletFrame->currentWalletModel (), this );
404
+ });
399
405
}
400
406
#endif // ENABLE_WALLET
401
407
@@ -418,6 +424,7 @@ void BitcoinGUI::createMenuBar()
418
424
if (walletFrame)
419
425
{
420
426
file->addAction (m_open_wallet_action);
427
+ file->addAction (m_close_wallet_action);
421
428
file->addSeparator ();
422
429
file->addAction (openAction);
423
430
file->addAction (backupWalletAction);
@@ -693,6 +700,7 @@ void BitcoinGUI::setWalletActionsEnabled(bool enabled)
693
700
usedSendingAddressesAction->setEnabled (enabled);
694
701
usedReceivingAddressesAction->setEnabled (enabled);
695
702
openAction->setEnabled (enabled);
703
+ m_close_wallet_action->setEnabled (enabled);
696
704
}
697
705
698
706
void BitcoinGUI::createTrayIcon ()
0 commit comments