aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
authorGavin Andresen <[email protected]>2013-05-03 14:39:22 -0700
committerGavin Andresen <[email protected]>2013-05-03 14:39:22 -0700
commitdb1dc95f0ad75f621da74339a35e25b04b2e8796 (patch)
tree1976631b7918dcd44bbc0cae48e191972630a78b /src/qt/bitcoin.cpp
parentMerge pull request #2610 from gavinandresen/scriptcleanup (diff)
parentosx: show testnet icon in dock as early as possible (diff)
downloaddiscoin-db1dc95f0ad75f621da74339a35e25b04b2e8796.tar.xz
discoin-db1dc95f0ad75f621da74339a35e25b04b2e8796.zip
Merge pull request #2614 from jonasschnelli/icon_testnet_mac
osx: show testnet icon in dock as early as possible
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r--src/qt/bitcoin.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 25448ea8c..1083f9bfe 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -23,6 +23,10 @@
#include <QTranslator>
#include <QLibraryInfo>
+#ifdef Q_OS_MAC
+#include "macdockiconhandler.h"
+#endif
+
#if defined(BITCOIN_NEED_QT_PLUGINS) && !defined(_BITCOIN_QT_PLUGINS_INCLUDED)
#define _BITCOIN_QT_PLUGINS_INCLUDED
#define __INSURE__
@@ -198,6 +202,13 @@ int main(int argc, char *argv[])
return 1;
}
+#ifdef Q_OS_MAC
+ // on mac, also change the icon now because it would look strange to have a testnet splash (green) and a std app icon (orange)
+ if(GetBoolArg("-testnet")) {
+ MacDockIconHandler::instance()->setIcon(QIcon(":icons/bitcoin_testnet"));
+ }
+#endif
+
SplashScreen splash(QPixmap(), 0);
if (GetBoolArg("-splash", true) && !GetBoolArg("-min"))
{