Changeset View
Changeset View
Standalone View
Standalone View
src/qt/splashscreen.cpp
// Copyright (c) 2011-2016 The Bitcoin Core developers | // Copyright (c) 2011-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#if defined(HAVE_CONFIG_H) | #if defined(HAVE_CONFIG_H) | ||||
#include <config/bitcoin-config.h> | #include <config/bitcoin-config.h> | ||||
#endif | #endif | ||||
#include <qt/splashscreen.h> | #include <qt/splashscreen.h> | ||||
#include <clientversion.h> | #include <clientversion.h> | ||||
#include <interfaces/handler.h> | #include <interfaces/handler.h> | ||||
#include <interfaces/node.h> | #include <interfaces/node.h> | ||||
#include <interfaces/wallet.h> | #include <interfaces/wallet.h> | ||||
#include <qt/guiutil.h> | #include <qt/guiutil.h> | ||||
#include <qt/networkstyle.h> | #include <qt/networkstyle.h> | ||||
#include <qt/walletmodel.h> | |||||
#include <util/system.h> | #include <util/system.h> | ||||
#include <util/translation.h> | #include <util/translation.h> | ||||
#include <QApplication> | #include <QApplication> | ||||
#include <QCloseEvent> | #include <QCloseEvent> | ||||
#include <QPainter> | #include <QPainter> | ||||
#include <QRadialGradient> | #include <QRadialGradient> | ||||
#include <QScreen> | #include <QScreen> | ||||
▲ Show 20 Lines • Show All 192 Lines • ▼ Show 20 Lines | |||||
void SplashScreen::subscribeToCoreSignals() { | void SplashScreen::subscribeToCoreSignals() { | ||||
// Connect signals to client | // Connect signals to client | ||||
m_handler_init_message = m_node->handleInitMessage( | m_handler_init_message = m_node->handleInitMessage( | ||||
std::bind(InitMessage, this, std::placeholders::_1)); | std::bind(InitMessage, this, std::placeholders::_1)); | ||||
m_handler_show_progress = m_node->handleShowProgress( | m_handler_show_progress = m_node->handleShowProgress( | ||||
std::bind(ShowProgress, this, std::placeholders::_1, | std::bind(ShowProgress, this, std::placeholders::_1, | ||||
std::placeholders::_2, std::placeholders::_3)); | std::placeholders::_2, std::placeholders::_3)); | ||||
} | |||||
void SplashScreen::handleLoadWallet() { | |||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
m_handler_load_wallet = m_node->handleLoadWallet( | if (!WalletModel::isWalletEnabled()) { | ||||
return; | |||||
} | |||||
m_handler_load_wallet = m_node->walletClient().handleLoadWallet( | |||||
[this](std::unique_ptr<interfaces::Wallet> wallet) { | [this](std::unique_ptr<interfaces::Wallet> wallet) { | ||||
ConnectWallet(std::move(wallet)); | ConnectWallet(std::move(wallet)); | ||||
}); | }); | ||||
#endif | #endif | ||||
} | } | ||||
void SplashScreen::unsubscribeFromCoreSignals() { | void SplashScreen::unsubscribeFromCoreSignals() { | ||||
// Disconnect signals from client | // Disconnect signals from client | ||||
Show All 30 Lines |