From c52c4e5d14fb20a0abc6fdcf8601ae5a0626ddcf Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 11 Mar 2014 08:32:07 +0100 Subject: qt: Make it possible again to specify -testnet in config file Changes for the datadir chooser have made it impossible to specify the network (testnet/regtest) in the configuration file for the GUI. Reorganize the initialization sequence to make this possible again. - Moves the "datadir" QSetting so that is no longer dependent on the network-specific application name (doing otherwise would create a chicken-and-egg problem). - Re-initialize translations after choosing network. There may be a different language configured in network-specific settings (slim chance, but handle it for sanity). Fixes point 1 of #3840. --- src/qt/intro.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/qt/intro.cpp') diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp index 42833a8a3..3bc19f864 100644 --- a/src/qt/intro.cpp +++ b/src/qt/intro.cpp @@ -146,7 +146,7 @@ QString Intro::getDefaultDataDirectory() return QString::fromStdString(GetDefaultDataDir().string()); } -void Intro::pickDataDirectory(bool fIsTestnet) +void Intro::pickDataDirectory() { namespace fs = boost::filesystem; QSettings settings; @@ -164,10 +164,7 @@ void Intro::pickDataDirectory(bool fIsTestnet) /* 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")); + intro.setWindowIcon(QIcon(":icons/bitcoin")); while(true) { -- cgit v1.2.3