v30.3-roots.1 · Commit 5: [PATCH 05/68] feat(qt): preserve Roots identity and GUI support on Core 30.3
src/qt/bitcoingui.cpp
Before: src/qt/bitcoingui.cpp · After: src/qt/bitcoingui.cpp
File metadata
index 9413356b412caecfe368f4931d9463d62bf46def..94069484fc7e584572854ba5dcd61718b7591e87 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 |
}
|
|
@@ -1173,6 +1183,9 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
|
|
| 1173 |
|
| 1174 |
progressBarLabel->setVisible(false);
|
| 1175 |
progressBar->setVisible(false);
|
|
|
|
|
|
|
|
|
|
| 1176 |
}
|
| 1177 |
else
|
| 1178 |
{
|
|
@@ -1183,6 +1196,11 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
|
|
| 1183 |
progressBar->setMaximum(1000000000);
|
| 1184 |
progressBar->setValue(nVerificationProgress * 1000000000.0 + 0.5);
|
| 1185 |
progressBar->setVisible(true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1186 |
|
| 1187 |
tooltip = tr("Catching up…") + QString("<br>") + tooltip;
|
| 1188 |
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 |
}
|
|
|
|
| 1183 |
|
| 1184 |
progressBarLabel->setVisible(false);
|
| 1185 |
progressBar->setVisible(false);
|
| 1186 |
+
#ifdef BITCOIN_QT_WIN_TASKBAR
|
| 1187 |
+
m_taskbar_progress->setVisible(false);
|
| 1188 |
+
#endif
|
| 1189 |
}
|
| 1190 |
else
|
| 1191 |
{
|
|
|
|
| 1196 |
progressBar->setMaximum(1000000000);
|
| 1197 |
progressBar->setValue(nVerificationProgress * 1000000000.0 + 0.5);
|
| 1198 |
progressBar->setVisible(true);
|
| 1199 |
+
#ifdef BITCOIN_QT_WIN_TASKBAR
|
| 1200 |
+
m_taskbar_progress->setWindow(this);
|
| 1201 |
+
m_taskbar_progress->setValue(qRound(nVerificationProgress * 100.0));
|
| 1202 |
+
m_taskbar_progress->setVisible(true);
|
| 1203 |
+
#endif
|
| 1204 |
|
| 1205 |
tooltip = tr("Catching up…") + QString("<br>") + tooltip;
|
| 1206 |
if(count != prevBlocks)
|