mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
Merge pull request #2931 from Diapolo/intro
Bitcoin-Qt: add testnet check and icon to intro dialog
This commit is contained in:
commit
ff33a3470d
@ -232,7 +232,7 @@ int main(int argc, char *argv[])
|
|||||||
PaymentServer* paymentServer = new PaymentServer(&app);
|
PaymentServer* paymentServer = new PaymentServer(&app);
|
||||||
|
|
||||||
// User language is set up: pick a data directory
|
// 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
|
// Install global event filter that makes sure that long tooltips can be word-wrapped
|
||||||
app.installEventFilter(new GUIUtil::ToolTipToRichTextFilter(TOOLTIP_WRAP_THRESHOLD, &app));
|
app.installEventFilter(new GUIUtil::ToolTipToRichTextFilter(TOOLTIP_WRAP_THRESHOLD, &app));
|
||||||
|
@ -142,7 +142,7 @@ QString Intro::getDefaultDataDirectory()
|
|||||||
return QString::fromStdString(GetDefaultDataDir().string());
|
return QString::fromStdString(GetDefaultDataDir().string());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Intro::pickDataDirectory()
|
void Intro::pickDataDirectory(bool fIsTestnet)
|
||||||
{
|
{
|
||||||
namespace fs = boost::filesystem;;
|
namespace fs = boost::filesystem;;
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
@ -160,6 +160,11 @@ void Intro::pickDataDirectory()
|
|||||||
/* If current default data directory does not exist, let the user choose one */
|
/* If current default data directory does not exist, let the user choose one */
|
||||||
Intro intro;
|
Intro intro;
|
||||||
intro.setDataDirectory(dataDir);
|
intro.setDataDirectory(dataDir);
|
||||||
|
if (!fIsTestnet)
|
||||||
|
intro.setWindowIcon(QIcon(":icons/bitcoin"));
|
||||||
|
else
|
||||||
|
intro.setWindowIcon(QIcon(":icons/bitcoin_testnet"));
|
||||||
|
|
||||||
while(true)
|
while(true)
|
||||||
{
|
{
|
||||||
if(!intro.exec())
|
if(!intro.exec())
|
||||||
|
@ -31,7 +31,7 @@ public:
|
|||||||
* @note do NOT call global GetDataDir() before calling this function, this
|
* @note do NOT call global GetDataDir() before calling this function, this
|
||||||
* will cause the wrong path to be cached.
|
* will cause the wrong path to be cached.
|
||||||
*/
|
*/
|
||||||
static void pickDataDirectory();
|
static void pickDataDirectory(bool fIsTestnet);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine default data directory for operating system.
|
* Determine default data directory for operating system.
|
||||||
|
Loading…
Reference in New Issue
Block a user