diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/bitcoin.qrc | 2 | ||||
-rw-r--r-- | src/qt/bitcoingui.cpp | 12 | ||||
-rw-r--r-- | src/qt/clientmodel.cpp | 5 | ||||
-rw-r--r-- | src/qt/clientmodel.h | 2 | ||||
-rw-r--r-- | src/qt/res/icons/bitcoin_testnet.png | bin | 0 -> 28756 bytes | |||
-rw-r--r-- | src/qt/res/icons/toolbar_testnet.png | bin | 0 -> 1037 bytes |
6 files changed, 21 insertions, 0 deletions
diff --git a/src/qt/bitcoin.qrc b/src/qt/bitcoin.qrc index 2e4cbbb5bd..fc35f89532 100644 --- a/src/qt/bitcoin.qrc +++ b/src/qt/bitcoin.qrc @@ -22,6 +22,8 @@ <file alias="editpaste">res/icons/editpaste.png</file> <file alias="editcopy">res/icons/editcopy.png</file> <file alias="add">res/icons/add.png</file> + <file alias="bitcoin_testnet">res/icons/bitcoin_testnet.png</file> + <file alias="toolbar_testnet">res/icons/toolbar_testnet.png</file> </qresource> <qresource prefix="/images"> <file alias="about">res/images/about.png</file> diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 2b1990b9cb..4e5eaa0683 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -182,6 +182,17 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel) { this->clientModel = clientModel; + if(clientModel->isTestNet()) + { + setWindowTitle(tr("Bitcoin [testnet]")); + setWindowIcon(QIcon(":icons/bitcoin_testnet")); + if(trayIcon) + { + trayIcon->setToolTip(tr("Bitcoin [testnet]")); + trayIcon->setIcon(QIcon(":/icons/toolbar_testnet")); + } + } + // Keep up to date with client setNumConnections(clientModel->getNumConnections()); connect(clientModel, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int))); @@ -229,6 +240,7 @@ void BitcoinGUI::createTrayIcon() trayIcon = new QSystemTrayIcon(this); trayIcon->setContextMenu(trayIconMenu); + trayIcon->setToolTip("Bitcoin client"); trayIcon->setIcon(QIcon(":/icons/toolbar")); connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(trayIconActivated(QSystemTrayIcon::ActivationReason))); diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index 125cb91017..30b4fe7235 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -39,6 +39,11 @@ void ClientModel::update() emit numBlocksChanged(getNumBlocks()); } +bool ClientModel::isTestNet() const +{ + return fTestNet; +} + bool ClientModel::inInitialBlockDownload() const { return IsInitialBlockDownload(); diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h index a5028ff3b8..18b3ba11e1 100644 --- a/src/qt/clientmodel.h +++ b/src/qt/clientmodel.h @@ -22,6 +22,8 @@ public: int getNumConnections() const; int getNumBlocks() const; + // Return true if client connected to testnet + bool isTestNet() const; // Return true if core is doing initial block download bool inInitialBlockDownload() const; // Return conservative estimate of total number of blocks, or 0 if unknown diff --git a/src/qt/res/icons/bitcoin_testnet.png b/src/qt/res/icons/bitcoin_testnet.png Binary files differnew file mode 100644 index 0000000000..ee2dc40563 --- /dev/null +++ b/src/qt/res/icons/bitcoin_testnet.png diff --git a/src/qt/res/icons/toolbar_testnet.png b/src/qt/res/icons/toolbar_testnet.png Binary files differnew file mode 100644 index 0000000000..90ed6d99f4 --- /dev/null +++ b/src/qt/res/icons/toolbar_testnet.png |