Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoingui.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/bitcoingui.h> | #include <qt/bitcoingui.h> | ||||
#include <chain.h> | |||||
#include <chainparams.h> | #include <chainparams.h> | ||||
#include <init.h> | #include <init.h> | ||||
#include <interfaces/handler.h> | #include <interfaces/handler.h> | ||||
#include <interfaces/node.h> | #include <interfaces/node.h> | ||||
#include <qt/bitcoinunits.h> | #include <qt/bitcoinunits.h> | ||||
#include <qt/clientmodel.h> | #include <qt/clientmodel.h> | ||||
#include <qt/guiconstants.h> | #include <qt/guiconstants.h> | ||||
#include <qt/guiutil.h> | #include <qt/guiutil.h> | ||||
▲ Show 20 Lines • Show All 845 Lines • ▼ Show 20 Lines | void BitcoinGUI::setNumBlocks(int count, const QDateTime &blockDate, | ||||
QString tooltip; | QString tooltip; | ||||
QDateTime currentDate = QDateTime::currentDateTime(); | QDateTime currentDate = QDateTime::currentDateTime(); | ||||
qint64 secs = blockDate.secsTo(currentDate); | qint64 secs = blockDate.secsTo(currentDate); | ||||
tooltip = tr("Processed %n block(s) of transaction history.", "", count); | tooltip = tr("Processed %n block(s) of transaction history.", "", count); | ||||
// Set icon state: spinning if catching up, tick otherwise | // Set icon state: spinning if catching up, tick otherwise | ||||
if (secs < 90 * 60) { | if (secs < MAX_BLOCK_TIME_GAP) { | ||||
tooltip = tr("Up to date") + QString(".<br>") + tooltip; | tooltip = tr("Up to date") + QString(".<br>") + tooltip; | ||||
labelBlocksIcon->setPixmap( | labelBlocksIcon->setPixmap( | ||||
platformStyle->SingleColorIcon(":/icons/synced") | platformStyle->SingleColorIcon(":/icons/synced") | ||||
.pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); | .pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); | ||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
if (walletFrame) { | if (walletFrame) { | ||||
walletFrame->showOutOfSyncWarning(false); | walletFrame->showOutOfSyncWarning(false); | ||||
▲ Show 20 Lines • Show All 454 Lines • Show Last 20 Lines |