v29.4-roots.1 · Commit 5: [PATCH 05/13] 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. The two line-number columns refer to before and after.
src/qt/bitcoingui.cpp
CHANGED
|
@@ -31,6 +31,9 @@
|
|
|
31
31
|
#ifdef Q_OS_MACOS
|
|
32
32
|
#include <qt/macdockiconhandler.h>
|
|
33
33
|
#endif
|
|
34
|
+
#ifdef BITCOIN_QT_WIN_TASKBAR
|
|
35
|
+
#include <qt/wintaskbarprogress.h>
|
|
36
|
+
#endif
|
|
34
37
|
|
|
35
38
|
#include <chain.h>
|
|
36
39
|
#include <chainparams.h>
|
|
@@ -223,6 +226,10 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
|
|
|
223
226
|
#ifdef Q_OS_MACOS
|
|
224
227
|
m_app_nap_inhibitor = new CAppNapInhibitor;
|
|
225
228
|
#endif
|
|
229
|
+
#ifdef BITCOIN_QT_WIN_TASKBAR
|
|
230
|
+
m_taskbar_progress = new WinTaskbarProgress(this);
|
|
231
|
+
QApplication::instance()->installNativeEventFilter(m_taskbar_progress);
|
|
232
|
+
#endif
|
|
226
233
|
|
|
227
234
|
GUIUtil::handleCloseWindowShortcut(this);
|
|
228
235
|
}
|
|
@@ -240,6 +247,9 @@ BitcoinGUI::~BitcoinGUI()
|
|
|
240
247
|
delete m_app_nap_inhibitor;
|
|
241
248
|
MacDockIconHandler::cleanup();
|
|
242
249
|
#endif
|
|
250
|
+
#ifdef BITCOIN_QT_WIN_TASKBAR
|
|
251
|
+
QApplication::instance()->removeNativeEventFilter(m_taskbar_progress);
|
|
252
|
+
#endif
|
|
243
253
|
|
|
244
254
|
delete rpcConsole;
|
|
245
255
|
}
|
|
@@ -1169,6 +1179,9 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
|
|
|
1169
1179
|
|
|
1170
1180
|
progressBarLabel->setVisible(false);
|
|
1171
1181
|
progressBar->setVisible(false);
|
|
1182
|
+
#ifdef BITCOIN_QT_WIN_TASKBAR
|
|
1183
|
+
m_taskbar_progress->setVisible(false);
|
|
1184
|
+
#endif
|
|
1172
1185
|
}
|
|
1173
1186
|
else
|
|
1174
1187
|
{
|
|
@@ -1179,6 +1192,11 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
|
|
|
1179
1192
|
progressBar->setMaximum(1000000000);
|
|
1180
1193
|
progressBar->setValue(nVerificationProgress * 1000000000.0 + 0.5);
|
|
1181
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
|
|
1182
1200
|
|
|
1183
1201
|
tooltip = tr("Catching up…") + QString("<br>") + tooltip;
|
|
1184
1202
|
if(count != prevBlocks)
|