aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/qt/bitcoingui.cpp20
-rw-r--r--src/serialize.h1
2 files changed, 15 insertions, 6 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index ed687c4532..c4462dd40c 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -334,13 +334,11 @@ void BitcoinGUI::setNumBlocks(int count)
QDateTime lastBlockDate = clientModel->getLastBlockDate();
int secs = lastBlockDate.secsTo(now);
QString text;
- bool spinning = true;
- // "Up to date" icon, and outdated icon
- if(secs < 30*60)
+ // Represent time from last generated block in human readable text
+ if(secs < 60)
{
- text = "Up to date";
- spinning = false;
+ text = tr("%n second(s) ago","",secs);
}
else if(secs < 60*60)
{
@@ -354,6 +352,16 @@ void BitcoinGUI::setNumBlocks(int count)
{
text = tr("%n day(s) ago","",secs/(60*60*24));
}
+
+ // In the label we want to be less specific
+ QString labelText = text;
+ bool spinning = true;
+ if(secs < 30*60)
+ {
+ labelText = "Up to date";
+ spinning = false;
+ }
+
tooltip += QString("\n");
tooltip += tr("Last received block was generated %1.").arg(text);
@@ -366,7 +374,7 @@ void BitcoinGUI::setNumBlocks(int count)
{
labelBlocksIcon->setPixmap(QIcon(":/icons/synced").pixmap(16,16));
}
- labelBlocks->setText(text);
+ labelBlocks->setText(labelText);
labelBlocksIcon->setToolTip(tooltip);
labelBlocks->setToolTip(tooltip);
diff --git a/src/serialize.h b/src/serialize.h
index cb3a3ea03c..857d0468d1 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -30,6 +30,7 @@ typedef unsigned long long uint64;
#endif
#ifdef __WXMSW__
+#include <windows.h>
// This is used to attempt to keep keying material out of swap
// Note that VirtualLock does not provide this as a guarantee on Windows,
// but, in practice, memory that has been VirtualLock'd almost never gets written to