Browse Source

osx: show testnet icon in dock as early as possible

A green testnet splashscreen with a normal, orange dock icon looks strange and can confuse users.

Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
miguelfreitas
Jonas Schnelli 12 years ago
parent
commit
367491df9d
  1. 11
      src/qt/bitcoin.cpp

11
src/qt/bitcoin.cpp

@ -23,6 +23,10 @@ @@ -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[]) @@ -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"))
{

Loading…
Cancel
Save