mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-11 15:27:57 +00:00
Make it very clear when on testnet (green icon, add [testnet] to title)
This commit is contained in:
parent
ef079e183b
commit
d56c6f312c
@ -22,6 +22,8 @@
|
|||||||
<file alias="editpaste">res/icons/editpaste.png</file>
|
<file alias="editpaste">res/icons/editpaste.png</file>
|
||||||
<file alias="editcopy">res/icons/editcopy.png</file>
|
<file alias="editcopy">res/icons/editcopy.png</file>
|
||||||
<file alias="add">res/icons/add.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>
|
||||||
<qresource prefix="/images">
|
<qresource prefix="/images">
|
||||||
<file alias="about">res/images/about.png</file>
|
<file alias="about">res/images/about.png</file>
|
||||||
|
@ -182,6 +182,17 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
|
|||||||
{
|
{
|
||||||
this->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
|
// Keep up to date with client
|
||||||
setNumConnections(clientModel->getNumConnections());
|
setNumConnections(clientModel->getNumConnections());
|
||||||
connect(clientModel, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int)));
|
connect(clientModel, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int)));
|
||||||
@ -229,6 +240,7 @@ void BitcoinGUI::createTrayIcon()
|
|||||||
|
|
||||||
trayIcon = new QSystemTrayIcon(this);
|
trayIcon = new QSystemTrayIcon(this);
|
||||||
trayIcon->setContextMenu(trayIconMenu);
|
trayIcon->setContextMenu(trayIconMenu);
|
||||||
|
trayIcon->setToolTip("Bitcoin client");
|
||||||
trayIcon->setIcon(QIcon(":/icons/toolbar"));
|
trayIcon->setIcon(QIcon(":/icons/toolbar"));
|
||||||
connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
|
connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
|
||||||
this, SLOT(trayIconActivated(QSystemTrayIcon::ActivationReason)));
|
this, SLOT(trayIconActivated(QSystemTrayIcon::ActivationReason)));
|
||||||
|
@ -39,6 +39,11 @@ void ClientModel::update()
|
|||||||
emit numBlocksChanged(getNumBlocks());
|
emit numBlocksChanged(getNumBlocks());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ClientModel::isTestNet() const
|
||||||
|
{
|
||||||
|
return fTestNet;
|
||||||
|
}
|
||||||
|
|
||||||
bool ClientModel::inInitialBlockDownload() const
|
bool ClientModel::inInitialBlockDownload() const
|
||||||
{
|
{
|
||||||
return IsInitialBlockDownload();
|
return IsInitialBlockDownload();
|
||||||
|
@ -22,6 +22,8 @@ public:
|
|||||||
int getNumConnections() const;
|
int getNumConnections() const;
|
||||||
int getNumBlocks() const;
|
int getNumBlocks() const;
|
||||||
|
|
||||||
|
// Return true if client connected to testnet
|
||||||
|
bool isTestNet() const;
|
||||||
// Return true if core is doing initial block download
|
// Return true if core is doing initial block download
|
||||||
bool inInitialBlockDownload() const;
|
bool inInitialBlockDownload() const;
|
||||||
// Return conservative estimate of total number of blocks, or 0 if unknown
|
// Return conservative estimate of total number of blocks, or 0 if unknown
|
||||||
|
BIN
src/qt/res/icons/bitcoin_testnet.png
Normal file
BIN
src/qt/res/icons/bitcoin_testnet.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
BIN
src/qt/res/icons/toolbar_testnet.png
Normal file
BIN
src/qt/res/icons/toolbar_testnet.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
Loading…
Reference in New Issue
Block a user