@ -403,8 +403,8 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
setNumConnections ( clientModel - > getNumConnections ( ) ) ;
setNumConnections ( clientModel - > getNumConnections ( ) ) ;
connect ( clientModel , SIGNAL ( numConnectionsChanged ( int ) ) , this , SLOT ( setNumConnections ( int ) ) ) ;
connect ( clientModel , SIGNAL ( numConnectionsChanged ( int ) ) , this , SLOT ( setNumConnections ( int ) ) ) ;
setNumBlocks ( clientModel - > getNumBlocks ( ) , clientModel - > getNumBlocksOfPeers ( ) ) ;
setNumBlocks ( clientModel - > getNumBlocks ( ) ) ;
connect ( clientModel , SIGNAL ( numBlocksChanged ( int , int ) ) , this , SLOT ( setNumBlocks ( int , int ) ) ) ;
connect ( clientModel , SIGNAL ( numBlocksChanged ( int ) ) , this , SLOT ( setNumBlocks ( int ) ) ) ;
// Receive and report messages from client model
// Receive and report messages from client model
connect ( clientModel , SIGNAL ( message ( QString , QString , unsigned int ) ) , this , SLOT ( message ( QString , QString , unsigned int ) ) ) ;
connect ( clientModel , SIGNAL ( message ( QString , QString , unsigned int ) ) , this , SLOT ( message ( QString , QString , unsigned int ) ) ) ;
@ -617,7 +617,7 @@ void BitcoinGUI::setNumConnections(int count)
labelConnectionsIcon - > setToolTip ( tr ( " %n active connection(s) to Bitcoin network " , " " , count ) ) ;
labelConnectionsIcon - > setToolTip ( tr ( " %n active connection(s) to Bitcoin network " , " " , count ) ) ;
}
}
void BitcoinGUI : : setNumBlocks ( int count , int nTotalBlocks )
void BitcoinGUI : : setNumBlocks ( int count )
{
{
// Prevent orphan statusbar messages (e.g. hover Quit in main menu, wait until chain-sync starts -> garbelled text)
// Prevent orphan statusbar messages (e.g. hover Quit in main menu, wait until chain-sync starts -> garbelled text)
statusBar ( ) - > clearMessage ( ) ;
statusBar ( ) - > clearMessage ( ) ;
@ -646,17 +646,10 @@ void BitcoinGUI::setNumBlocks(int count, int nTotalBlocks)
QDateTime currentDate = QDateTime : : currentDateTime ( ) ;
QDateTime currentDate = QDateTime : : currentDateTime ( ) ;
int secs = lastBlockDate . secsTo ( currentDate ) ;
int secs = lastBlockDate . secsTo ( currentDate ) ;
if ( count < nTotalBlocks )
tooltip = tr ( " Processed %1 blocks of transaction history. " ) . arg ( count ) ;
{
tooltip = tr ( " Processed %1 of %2 (estimated) blocks of transaction history. " ) . arg ( count ) . arg ( nTotalBlocks ) ;
}
else
{
tooltip = tr ( " Processed %1 blocks of transaction history. " ) . arg ( count ) ;
}
// Set icon state: spinning if catching up, tick otherwise
// Set icon state: spinning if catching up, tick otherwise
if ( secs < 90 * 60 & & count > = nTotalBlocks )
if ( secs < 90 * 60 )
{
{
tooltip = tr ( " Up to date " ) + QString ( " .<br> " ) + tooltip ;
tooltip = tr ( " Up to date " ) + QString ( " .<br> " ) + tooltip ;
labelBlocksIcon - > setPixmap ( QIcon ( " :/icons/synced " ) . pixmap ( STATUSBAR_ICONSIZE , STATUSBAR_ICONSIZE ) ) ;
labelBlocksIcon - > setPixmap ( QIcon ( " :/icons/synced " ) . pixmap ( STATUSBAR_ICONSIZE , STATUSBAR_ICONSIZE ) ) ;