Changeset View
Changeset View
Standalone View
Standalone View
src/qt/splashscreen.cpp
Show First 20 Lines • Show All 182 Lines • ▼ Show 20 Lines | static void InitMessage(SplashScreen *splash, const std::string &message) { | ||||
QMetaObject::invokeMethod(splash, "showMessage", Qt::QueuedConnection, | QMetaObject::invokeMethod(splash, "showMessage", Qt::QueuedConnection, | ||||
Q_ARG(QString, QString::fromStdString(message)), | Q_ARG(QString, QString::fromStdString(message)), | ||||
Q_ARG(int, Qt::AlignBottom | Qt::AlignHCenter), | Q_ARG(int, Qt::AlignBottom | Qt::AlignHCenter), | ||||
Q_ARG(QColor, QColor(55, 55, 55))); | Q_ARG(QColor, QColor(55, 55, 55))); | ||||
} | } | ||||
static void ShowProgress(SplashScreen *splash, const std::string &title, | static void ShowProgress(SplashScreen *splash, const std::string &title, | ||||
int nProgress, bool resume_possible) { | int nProgress, bool resume_possible) { | ||||
InitMessage(splash, title + std::string("\n") + | InitMessage( | ||||
splash, | |||||
title + std::string("\n") + | |||||
(resume_possible | (resume_possible | ||||
? _("(press q to shutdown and continue later)") | ? _("(press q to shutdown and continue later)").translated | ||||
: _("press q to shutdown")) + | : _("press q to shutdown").translated) + | ||||
strprintf("\n%d", nProgress) + "%"); | strprintf("\n%d", nProgress) + "%"); | ||||
} | } | ||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
void SplashScreen::ConnectWallet(std::unique_ptr<interfaces::Wallet> wallet) { | void SplashScreen::ConnectWallet(std::unique_ptr<interfaces::Wallet> wallet) { | ||||
m_connected_wallet_handlers.emplace_back(wallet->handleShowProgress( | m_connected_wallet_handlers.emplace_back(wallet->handleShowProgress( | ||||
std::bind(ShowProgress, this, std::placeholders::_1, | std::bind(ShowProgress, this, std::placeholders::_1, | ||||
std::placeholders::_2, false))); | std::placeholders::_2, false))); | ||||
m_connected_wallets.emplace_back(std::move(wallet)); | m_connected_wallets.emplace_back(std::move(wallet)); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |