mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -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) +
|
: _("press q to shutdown").translated) +
|
||||||
strprintf("\n%d", nProgress) + "%");
|
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()
|
void SplashScreen::subscribeToCoreSignals()
|
||||||
{
|
{
|
||||||
|
@ -203,7 +196,10 @@ void SplashScreen::subscribeToCoreSignals()
|
||||||
void SplashScreen::handleLoadWallet()
|
void SplashScreen::handleLoadWallet()
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_WALLET
|
#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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,8 +56,6 @@ private:
|
||||||
void unsubscribeFromCoreSignals();
|
void unsubscribeFromCoreSignals();
|
||||||
/** Initiate shutdown */
|
/** Initiate shutdown */
|
||||||
void shutdown();
|
void shutdown();
|
||||||
/** Connect wallet signals to splash screen */
|
|
||||||
void ConnectWallet(std::unique_ptr<interfaces::Wallet> wallet);
|
|
||||||
|
|
||||||
QPixmap pixmap;
|
QPixmap pixmap;
|
||||||
QString curMessage;
|
QString curMessage;
|
||||||
|
|
Loading…
Add table
Reference in a new issue