mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
gui refactor: Inline SplashScreen::ConnectWallet
Suggested https://github.com/bitcoin/bitcoin/pull/19099#discussion_r450522201
This commit is contained in:
parent
e4f4350471
commit
24bf17602c
2 changed files with 4 additions and 10 deletions
|
@ -185,13 +185,6 @@ static void ShowProgress(SplashScreen *splash, const std::string &title, int nPr
|
|||
: _("press q to shutdown").translated) +
|
||||
strprintf("\n%d", nProgress) + "%");
|
||||
}
|
||||
#ifdef ENABLE_WALLET
|
||||
void SplashScreen::ConnectWallet(std::unique_ptr<interfaces::Wallet> wallet)
|
||||
{
|
||||
m_connected_wallet_handlers.emplace_back(wallet->handleShowProgress(std::bind(ShowProgress, this, std::placeholders::_1, std::placeholders::_2, false)));
|
||||
m_connected_wallets.emplace_back(std::move(wallet));
|
||||
}
|
||||
#endif
|
||||
|
||||
void SplashScreen::subscribeToCoreSignals()
|
||||
{
|
||||
|
@ -203,7 +196,10 @@ void SplashScreen::subscribeToCoreSignals()
|
|||
void SplashScreen::handleLoadWallet()
|
||||
{
|
||||
#ifdef ENABLE_WALLET
|
||||
m_handler_load_wallet = m_node->walletClient().handleLoadWallet([this](std::unique_ptr<interfaces::Wallet> wallet) { ConnectWallet(std::move(wallet)); });
|
||||
m_handler_load_wallet = m_node->walletClient().handleLoadWallet([this](std::unique_ptr<interfaces::Wallet> wallet) {
|
||||
m_connected_wallet_handlers.emplace_back(wallet->handleShowProgress(std::bind(ShowProgress, this, std::placeholders::_1, std::placeholders::_2, false)));
|
||||
m_connected_wallets.emplace_back(std::move(wallet));
|
||||
});
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -56,8 +56,6 @@ private:
|
|||
void unsubscribeFromCoreSignals();
|
||||
/** Initiate shutdown */
|
||||
void shutdown();
|
||||
/** Connect wallet signals to splash screen */
|
||||
void ConnectWallet(std::unique_ptr<interfaces::Wallet> wallet);
|
||||
|
||||
QPixmap pixmap;
|
||||
QString curMessage;
|
||||
|
|
Loading…
Add table
Reference in a new issue