aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-08-28 12:17:17 -0700
committerWladimir J. van der Laan <laanwj@gmail.com>2013-08-28 12:17:17 -0700
commitff33a3470dd1d1446549d02609c991c0490e0fdf (patch)
treeb65b997a125bdabe4ea94ba650515eb67ddd5fe2
parent1ef0067eab27b9101641b28acc177038e3dae11d (diff)
parentd9baa28f92603f8c26a50c6165234861deb6b536 (diff)
Merge pull request #2931 from Diapolo/intro
Bitcoin-Qt: add testnet check and icon to intro dialog
-rw-r--r--src/qt/bitcoin.cpp2
-rw-r--r--src/qt/intro.cpp7
-rw-r--r--src/qt/intro.h2
3 files changed, 8 insertions, 3 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index e7cf440044..9c290fa717 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -232,7 +232,7 @@ int main(int argc, char *argv[])
PaymentServer* paymentServer = new PaymentServer(&app);
// User language is set up: pick a data directory
- Intro::pickDataDirectory();
+ Intro::pickDataDirectory(TestNet());
// Install global event filter that makes sure that long tooltips can be word-wrapped
app.installEventFilter(new GUIUtil::ToolTipToRichTextFilter(TOOLTIP_WRAP_THRESHOLD, &app));
diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp
index 99db141c94..4a02ff89e7 100644
--- a/src/qt/intro.cpp
+++ b/src/qt/intro.cpp
@@ -142,7 +142,7 @@ QString Intro::getDefaultDataDirectory()
return QString::fromStdString(GetDefaultDataDir().string());
}
-void Intro::pickDataDirectory()
+void Intro::pickDataDirectory(bool fIsTestnet)
{
namespace fs = boost::filesystem;;
QSettings settings;
@@ -160,6 +160,11 @@ void Intro::pickDataDirectory()
/* If current default data directory does not exist, let the user choose one */
Intro intro;
intro.setDataDirectory(dataDir);
+ if (!fIsTestnet)
+ intro.setWindowIcon(QIcon(":icons/bitcoin"));
+ else
+ intro.setWindowIcon(QIcon(":icons/bitcoin_testnet"));
+
while(true)
{
if(!intro.exec())
diff --git a/src/qt/intro.h b/src/qt/intro.h
index 788799b7b0..8b09847abd 100644
--- a/src/qt/intro.h
+++ b/src/qt/intro.h
@@ -31,7 +31,7 @@ public:
* @note do NOT call global GetDataDir() before calling this function, this
* will cause the wrong path to be cached.
*/
- static void pickDataDirectory();
+ static void pickDataDirectory(bool fIsTestnet);
/**
* Determine default data directory for operating system.