Skip to content

Commit

Permalink
gui refactor: Inline SplashScreen::ConnectWallet
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanofsky committed Jul 10, 2020
1 parent 6a67d63 commit 86e2cbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
12 changes: 4 additions & 8 deletions src/qt/splashscreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,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()
{
Expand All @@ -190,7 +183,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
}

Expand Down
2 changes: 0 additions & 2 deletions src/qt/splashscreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ public Q_SLOTS:
void subscribeToCoreSignals();
/** Disconnect core signals to splash screen */
void unsubscribeFromCoreSignals();
/** Connect wallet signals to splash screen */
void ConnectWallet(std::unique_ptr<interfaces::Wallet> wallet);

QPixmap pixmap;
QString curMessage;
Expand Down

0 comments on commit 86e2cbe

Please sign in to comment.