v29.4-roots.2 · Commit 5: [PATCH 05/21] product: establish Roots identity and Qt experience
src/qt/bitcoingui.cpp
Before: src/qt/bitcoingui.cpp · After: src/qt/bitcoingui.cpp
File metadata
index f899a524f4575d522fd20e73ebba917d24b71efa..bc57485dd498876e78428d01b73b29d42d1df1c6 100644
Download original patch · Release notes
Diff rows 1–48 of 48. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. Before is on the left; after is on the right. Unified view fits narrow screens more easily.
src/qt/bitcoingui.cpp
CHANGED
|
@@ -31,6 +31,9 @@
|
|
| 31 |
#ifdef Q_OS_MACOS
|
| 32 |
#include <qt/macdockiconhandler.h>
|
| 33 |
#endif
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
#include <chain.h>
|
| 36 |
#include <chainparams.h>
|
|
@@ -223,6 +226,10 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
|
|
| 223 |
#ifdef Q_OS_MACOS
|
| 224 |
m_app_nap_inhibitor = new CAppNapInhibitor;
|
| 225 |
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
| 226 |
|
| 227 |
GUIUtil::handleCloseWindowShortcut(this);
|
| 228 |
}
|
|
@@ -240,6 +247,9 @@ BitcoinGUI::~BitcoinGUI()
|
|
| 240 |
delete m_app_nap_inhibitor;
|
| 241 |
MacDockIconHandler::cleanup();
|
| 242 |
#endif
|
|
|
|
|
|
|
|
|
|
| 243 |
|
| 244 |
delete rpcConsole;
|
| 245 |
}
|
|
@@ -1169,6 +1179,9 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
|
|
| 1169 |
|
| 1170 |
progressBarLabel->setVisible(false);
|
| 1171 |
progressBar->setVisible(false);
|
|
|
|
|
|
|
|
|
|
| 1172 |
}
|
| 1173 |
else
|
| 1174 |
{
|
|
@@ -1179,6 +1192,11 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
|
|
| 1179 |
progressBar->setMaximum(1000000000);
|
| 1180 |
progressBar->setValue(nVerificationProgress * 1000000000.0 + 0.5);
|
| 1181 |
progressBar->setVisible(true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1182 |
|
| 1183 |
tooltip = tr("Catching up…") + QString("<br>") + tooltip;
|
| 1184 |
if(count != prevBlocks)
|
|
|
|
| 31 |
#ifdef Q_OS_MACOS
|
| 32 |
#include <qt/macdockiconhandler.h>
|
| 33 |
#endif
|
| 34 |
+
#ifdef BITCOIN_QT_WIN_TASKBAR
|
| 35 |
+
#include <qt/wintaskbarprogress.h>
|
| 36 |
+
#endif
|
| 37 |
|
| 38 |
#include <chain.h>
|
| 39 |
#include <chainparams.h>
|
|
|
|
| 226 |
#ifdef Q_OS_MACOS
|
| 227 |
m_app_nap_inhibitor = new CAppNapInhibitor;
|
| 228 |
#endif
|
| 229 |
+
#ifdef BITCOIN_QT_WIN_TASKBAR
|
| 230 |
+
m_taskbar_progress = new WinTaskbarProgress(this);
|
| 231 |
+
QApplication::instance()->installNativeEventFilter(m_taskbar_progress);
|
| 232 |
+
#endif
|
| 233 |
|
| 234 |
GUIUtil::handleCloseWindowShortcut(this);
|
| 235 |
}
|
|
|
|
| 247 |
delete m_app_nap_inhibitor;
|
| 248 |
MacDockIconHandler::cleanup();
|
| 249 |
#endif
|
| 250 |
+
#ifdef BITCOIN_QT_WIN_TASKBAR
|
| 251 |
+
QApplication::instance()->removeNativeEventFilter(m_taskbar_progress);
|
| 252 |
+
#endif
|
| 253 |
|
| 254 |
delete rpcConsole;
|
| 255 |
}
|
|
|
|
| 1179 |
|
| 1180 |
progressBarLabel->setVisible(false);
|
| 1181 |
progressBar->setVisible(false);
|
| 1182 |
+
#ifdef BITCOIN_QT_WIN_TASKBAR
|
| 1183 |
+
m_taskbar_progress->setVisible(false);
|
| 1184 |
+
#endif
|
| 1185 |
}
|
| 1186 |
else
|
| 1187 |
{
|
|
|
|
| 1192 |
progressBar->setMaximum(1000000000);
|
| 1193 |
progressBar->setValue(nVerificationProgress * 1000000000.0 + 0.5);
|
| 1194 |
progressBar->setVisible(true);
|
| 1195 |
+
#ifdef BITCOIN_QT_WIN_TASKBAR
|
| 1196 |
+
m_taskbar_progress->setWindow(this);
|
| 1197 |
+
m_taskbar_progress->setValue(qRound(nVerificationProgress * 100.0));
|
| 1198 |
+
m_taskbar_progress->setVisible(true);
|
| 1199 |
+
#endif
|
| 1200 |
|
| 1201 |
tooltip = tr("Catching up…") + QString("<br>") + tooltip;
|
| 1202 |
if(count != prevBlocks)
|