@@ -350,6 +350,9 @@ void BitcoinGUI::createActions()
350
350
m_create_wallet_action->setEnabled (false );
351
351
m_create_wallet_action->setStatusTip (tr (" Create a new wallet" ));
352
352
353
+ m_close_all_wallets_action = new QAction (tr (" Close All Wallets..." ), this );
354
+ m_close_all_wallets_action->setStatusTip (tr (" Close all wallets" ));
355
+
353
356
showHelpMessageAction = new QAction (tr (" &Command-line options" ), this );
354
357
showHelpMessageAction->setMenuRole (QAction::NoRole);
355
358
showHelpMessageAction->setStatusTip (tr (" Show the %1 help message to get a list with possible Bitcoin command-line options" ).arg (PACKAGE_NAME));
@@ -421,7 +424,9 @@ void BitcoinGUI::createActions()
421
424
connect (activity, &CreateWalletActivity::finished, activity, &QObject::deleteLater);
422
425
activity->create ();
423
426
});
424
-
427
+ connect (m_close_all_wallets_action, &QAction::triggered, [this ] {
428
+ m_wallet_controller->closeAllWallets (this );
429
+ });
425
430
connect (m_mask_values_action, &QAction::toggled, this , &BitcoinGUI::setPrivacy);
426
431
}
427
432
#endif // ENABLE_WALLET
@@ -447,6 +452,7 @@ void BitcoinGUI::createMenuBar()
447
452
file->addAction (m_create_wallet_action);
448
453
file->addAction (m_open_wallet_action);
449
454
file->addAction (m_close_wallet_action);
455
+ file->addAction (m_close_all_wallets_action);
450
456
file->addSeparator ();
451
457
file->addAction (openAction);
452
458
file->addAction (backupWalletAction);
@@ -727,6 +733,7 @@ void BitcoinGUI::setWalletActionsEnabled(bool enabled)
727
733
usedReceivingAddressesAction->setEnabled (enabled);
728
734
openAction->setEnabled (enabled);
729
735
m_close_wallet_action->setEnabled (enabled);
736
+ m_close_all_wallets_action->setEnabled (enabled);
730
737
}
731
738
732
739
void BitcoinGUI::createTrayIcon ()
0 commit comments