Cleanup names
This commit is contained in:
32
src/main.cpp
32
src/main.cpp
@@ -147,17 +147,9 @@ public:
|
|||||||
|
|
||||||
// Command line parser
|
// Command line parser
|
||||||
QCommandLineParser parser;
|
QCommandLineParser parser;
|
||||||
parser.setApplicationDescription("Shielded desktop wallet and embedded full node for Zcash");
|
parser.setApplicationDescription("Shielded desktop light wallet for Zcash");
|
||||||
parser.addHelpOption();
|
parser.addHelpOption();
|
||||||
|
|
||||||
// A boolean option for running it headless
|
|
||||||
QCommandLineOption headlessOption(QStringList() << "headless", "Running it via GUI.");
|
|
||||||
parser.addOption(headlessOption);
|
|
||||||
|
|
||||||
// No embedded will disable the embedded zcashd node
|
|
||||||
QCommandLineOption noembeddedOption(QStringList() << "no-embedded", "Disable embedded zcashd");
|
|
||||||
parser.addOption(noembeddedOption);
|
|
||||||
|
|
||||||
// Add an option to specify the conf file
|
// Add an option to specify the conf file
|
||||||
QCommandLineOption confOption(QStringList() << "conf", "Use the zcash.conf specified instead of looking for the default one.",
|
QCommandLineOption confOption(QStringList() << "conf", "Use the zcash.conf specified instead of looking for the default one.",
|
||||||
"confFile");
|
"confFile");
|
||||||
@@ -177,8 +169,8 @@ public:
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
QCoreApplication::setOrganizationName("zec-qt-wallet-org");
|
QCoreApplication::setOrganizationName("zecwallet-org");
|
||||||
QCoreApplication::setApplicationName("zec-qt-wallet");
|
QCoreApplication::setApplicationName("zecwallet");
|
||||||
|
|
||||||
QString locale = QLocale::system().name();
|
QString locale = QLocale::system().name();
|
||||||
locale.truncate(locale.lastIndexOf('_')); // Get the language code
|
locale.truncate(locale.lastIndexOf('_')); // Get the language code
|
||||||
@@ -214,12 +206,7 @@ public:
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for embedded option
|
Settings::getInstance()->setUseEmbedded(false);
|
||||||
if (parser.isSet(noembeddedOption)) {
|
|
||||||
Settings::getInstance()->setUseEmbedded(false);
|
|
||||||
} else {
|
|
||||||
Settings::getInstance()->setUseEmbedded(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check to see if a conf location was specified
|
// Check to see if a conf location was specified
|
||||||
if (parser.isSet(confOption)) {
|
if (parser.isSet(confOption)) {
|
||||||
@@ -227,7 +214,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
w = new MainWindow();
|
w = new MainWindow();
|
||||||
w->setWindowTitle("ZecWallet FullNode v" + QString(APP_VERSION));
|
w->setWindowTitle("ZecWallet v" + QString(APP_VERSION));
|
||||||
|
|
||||||
// If there was a payment URI on the command line, pay it
|
// If there was a payment URI on the command line, pay it
|
||||||
if (parser.positionalArguments().length() > 0) {
|
if (parser.positionalArguments().length() > 0) {
|
||||||
@@ -246,13 +233,8 @@ public:
|
|||||||
a.installEventFilter(w);
|
a.installEventFilter(w);
|
||||||
|
|
||||||
// Check if starting headless
|
// Check if starting headless
|
||||||
if (parser.isSet(headlessOption)) {
|
Settings::getInstance()->setHeadless(false);
|
||||||
Settings::getInstance()->setHeadless(true);
|
w->show();
|
||||||
a.setQuitOnLastWindowClosed(false);
|
|
||||||
} else {
|
|
||||||
Settings::getInstance()->setHeadless(false);
|
|
||||||
w->show();
|
|
||||||
}
|
|
||||||
|
|
||||||
return QApplication::exec();
|
return QApplication::exec();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user