Skip to content

Commit 565c551

Browse files
committed
Merge #770: Revert "gui: provide wallet controller context to wallet actions"
f09bfab Revert "gui: provide wallet controller context to wallet actions" (Hennadii Stepanov) Pull request description: The commit 7066e89 from #765 breaks "Open Wallet", "Close Wallet" and "Close All Wallets" items in the File menu (at least on Ubuntu 23.10 + Wayland). Reverting it to avoid this regression in the 26.0 release. ACKs for top commit: furszy: ACK f09bfab for including it in v26. jarolrod: ACK f09bfab Tree-SHA512: fedc621c8e9bf84a263b0c28da53225febe0267d0123830a6192297f38e40726e1613e003b634215e7d16791ba6eab52fb4baab3da9637f6660b6ae1ae98462b
2 parents 0046f3d + f09bfab commit 565c551

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/qt/bitcoingui.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ void BitcoinGUI::createActions()
392392
connect(usedSendingAddressesAction, &QAction::triggered, walletFrame, &WalletFrame::usedSendingAddresses);
393393
connect(usedReceivingAddressesAction, &QAction::triggered, walletFrame, &WalletFrame::usedReceivingAddresses);
394394
connect(openAction, &QAction::triggered, this, &BitcoinGUI::openClicked);
395-
connect(m_open_wallet_menu, &QMenu::aboutToShow, m_wallet_controller, [this] {
395+
connect(m_open_wallet_menu, &QMenu::aboutToShow, [this] {
396396
m_open_wallet_menu->clear();
397397
for (const std::pair<const std::string, bool>& i : m_wallet_controller->listWalletDir()) {
398398
const std::string& path = i.first;
@@ -409,7 +409,7 @@ void BitcoinGUI::createActions()
409409
continue;
410410
}
411411

412-
connect(action, &QAction::triggered, m_wallet_controller, [this, path] {
412+
connect(action, &QAction::triggered, [this, path] {
413413
auto activity = new OpenWalletActivity(m_wallet_controller, this);
414414
connect(activity, &OpenWalletActivity::opened, this, &BitcoinGUI::setCurrentWallet, Qt::QueuedConnection);
415415
connect(activity, &OpenWalletActivity::opened, rpcConsole, &RPCConsole::setCurrentWallet, Qt::QueuedConnection);
@@ -421,7 +421,7 @@ void BitcoinGUI::createActions()
421421
action->setEnabled(false);
422422
}
423423
});
424-
connect(m_restore_wallet_action, &QAction::triggered, m_wallet_controller, [this] {
424+
connect(m_restore_wallet_action, &QAction::triggered, [this] {
425425
//: Name of the wallet data file format.
426426
QString name_data_file = tr("Wallet Data");
427427

@@ -447,14 +447,14 @@ void BitcoinGUI::createActions()
447447
auto backup_file_path = fs::PathFromString(backup_file.toStdString());
448448
activity->restore(backup_file_path, wallet_name.toStdString());
449449
});
450-
connect(m_close_wallet_action, &QAction::triggered, m_wallet_controller, [this] {
450+
connect(m_close_wallet_action, &QAction::triggered, [this] {
451451
m_wallet_controller->closeWallet(walletFrame->currentWalletModel(), this);
452452
});
453453
connect(m_create_wallet_action, &QAction::triggered, this, &BitcoinGUI::createWallet);
454-
connect(m_close_all_wallets_action, &QAction::triggered, m_wallet_controller, [this] {
454+
connect(m_close_all_wallets_action, &QAction::triggered, [this] {
455455
m_wallet_controller->closeAllWallets(this);
456456
});
457-
connect(m_migrate_wallet_action, &QAction::triggered, m_wallet_controller, [this] {
457+
connect(m_migrate_wallet_action, &QAction::triggered, [this] {
458458
auto activity = new MigrateWalletActivity(m_wallet_controller, this);
459459
connect(activity, &MigrateWalletActivity::migrated, this, &BitcoinGUI::setCurrentWallet);
460460
activity->migrate(walletFrame->currentWalletModel());

0 commit comments

Comments
 (0)