From 10c9b36f8aeb61080eeea011ae0ce74309be8c53 Mon Sep 17 00:00:00 2001 From: Jane Mercer Date: Sun, 5 May 2019 18:15:47 -0700 Subject: [PATCH] initial pirate version --- src/about.ui | 4 ++-- src/connection.cpp | 44 ++++++++++++++++++++++---------------------- src/main.cpp | 8 ++++---- src/mainwindow.cpp | 12 ++++++------ src/mainwindow.ui | 4 ++-- src/rpc.cpp | 2 +- src/settings.cpp | 2 +- src/websockets.cpp | 2 +- 8 files changed, 39 insertions(+), 39 deletions(-) diff --git a/src/about.ui b/src/about.ui index 6332d7e..81320e9 100644 --- a/src/about.ui +++ b/src/about.ui @@ -17,7 +17,7 @@ - ZecWallet + SevenSeas @@ -52,7 +52,7 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.1pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:11pt;">Copyright (c) 2018 Aditya Kulkarni. (MIT License)</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:11pt;">Copyright (c) 2019 David Mercer and Aditya Kulkarni. (MIT License)</span></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:11pt;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:11pt;">Special thanks to:</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:11pt;">JSON for Modern C++ : </span><a href="https://nlohmann.github.io/json/"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">https://nlohmann.github.io/json/</span></a></p> diff --git a/src/connection.cpp b/src/connection.cpp index bed5dcb..ae48a4f 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -74,13 +74,13 @@ void ConnectionLoader::doAutoConnect(bool tryEzcashdStart) { main->logger->write("Couldn't start embedded zcashd for unknown reason"); QString explanation; if (config->zcashDaemon) { - explanation = QString() % QObject::tr("You have zcashd set to start as a daemon, which can cause problems " - "with ZecWallet\n\n." - "Please remove the following line from your zcash.conf and restart ZecWallet\n" + explanation = QString() % QObject::tr("You have komodod set to start as a daemon, which can cause problems " + "with SevenSeas\n\n." + "Please remove the following line from your PIRATE.conf and restart SevenSeas\n" "daemon=1"); } else { - explanation = QString() % QObject::tr("Couldn't start the embedded zcashd.\n\n" - "Please try restarting.\n\nIf you previously started zcashd with custom arguments, you might need to reset zcash.conf.\n\n" + explanation = QString() % QObject::tr("Couldn't start the embedded komodod.\n\n" + "Please try restarting.\n\nIf you previously started komodod with custom arguments, you might need to reset PIRATE.conf.\n\n" "If all else fails, please run zcashd manually.") % (ezcashd ? QObject::tr("The process returned") + ":\n\n" % ezcashd->errorString() : QString("")); } @@ -88,16 +88,16 @@ void ConnectionLoader::doAutoConnect(bool tryEzcashdStart) { this->showError(explanation); } } else { - // zcash.conf exists, there's no connection, and the user asked us not to start zcashd. Error! + // PIRATE.conf exists, there's no connection, and the user asked us not to start zcashd. Error! main->logger->write("Not using embedded and couldn't connect to zcashd"); - QString explanation = QString() % QObject::tr("Couldn't connect to zcashd configured in zcash.conf.\n\n" + QString explanation = QString() % QObject::tr("Couldn't connect to zcashd configured in PIRATE.conf.\n\n" "Not starting embedded zcashd because --no-embedded was passed"); this->showError(explanation); } }); } else { if (Settings::getInstance()->useEmbedded()) { - // zcash.conf was not found, so create one + // PIRATE.conf was not found, so create one createZcashConf(); } else { // Fall back to manual connect @@ -124,7 +124,7 @@ QString randomPassword() { } /** - * This will create a new zcash.conf, download Zcash parameters. + * This will create a new PIRATE.conf, download Zcash parameters. */ void ConnectionLoader::createZcashConf() { main->logger->write("createZcashConf"); @@ -175,7 +175,7 @@ void ConnectionLoader::createZcashConf() { QFile file(confLocation); if (!file.open(QIODevice::ReadWrite | QIODevice::Truncate)) { - main->logger->write("Could not create zcash.conf, returning"); + main->logger->write("Could not create PIRATE.conf, returning"); return; } @@ -194,7 +194,7 @@ void ConnectionLoader::createZcashConf() { file.close(); - // Now that zcash.conf exists, try to autoconnect again + // Now that PIRATE.conf exists, try to autoconnect again this->doAutoConnect(); } @@ -330,12 +330,12 @@ bool ConnectionLoader::startEmbeddedZcashd() { #ifdef Q_OS_LINUX auto zcashdProgram = appPath.absoluteFilePath("zqw-zcashd"); if (!QFile(zcashdProgram).exists()) { - zcashdProgram = appPath.absoluteFilePath("zcashd"); + zcashdProgram = appPath.absoluteFilePath("komodod"); } #elif defined(Q_OS_DARWIN) - auto zcashdProgram = appPath.absoluteFilePath("zcashd"); + auto zcashdProgram = appPath.absoluteFilePath("komodod"); #else - auto zcashdProgram = appPath.absoluteFilePath("zcashd.exe"); + auto zcashdProgram = appPath.absoluteFilePath("komodod.exe"); #endif if (!QFile(zcashdProgram).exists()) { @@ -511,11 +511,11 @@ void ConnectionLoader::showError(QString explanation) { QString ConnectionLoader::locateZcashConfFile() { #ifdef Q_OS_LINUX - auto confLocation = QStandardPaths::locate(QStandardPaths::HomeLocation, ".zcash/zcash.conf"); + auto confLocation = QStandardPaths::locate(QStandardPaths::HomeLocation, ".komodo/PIRATE/PIRATE.conf"); #elif defined(Q_OS_DARWIN) - auto confLocation = QStandardPaths::locate(QStandardPaths::HomeLocation, "Library/Application Support/Zcash/zcash.conf"); + auto confLocation = QStandardPaths::locate(QStandardPaths::HomeLocation, "Library/Application Support/Komodo/PIRATE/PIRATE.conf"); #else - auto confLocation = QStandardPaths::locate(QStandardPaths::AppDataLocation, "../../Zcash/zcash.conf"); + auto confLocation = QStandardPaths::locate(QStandardPaths::AppDataLocation, "../../Komodo/PIRATE/PIRATE.conf"); #endif main->logger->write("Found zcashconf at " + QDir::cleanPath(confLocation)); @@ -524,11 +524,11 @@ QString ConnectionLoader::locateZcashConfFile() { QString ConnectionLoader::zcashConfWritableLocation() { #ifdef Q_OS_LINUX - auto confLocation = QDir(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)).filePath(".zcash/zcash.conf"); + auto confLocation = QDir(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)).filePath(".komodo/PIRATE/PIRATE.conf"); #elif defined(Q_OS_DARWIN) - auto confLocation = QDir(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)).filePath("Library/Application Support/Zcash/zcash.conf"); + auto confLocation = QDir(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)).filePath("Library/Application Support/Zcash/PIRATE/PIRATE.conf"); #else - auto confLocation = QDir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)).filePath("../../Zcash/zcash.conf"); + auto confLocation = QDir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)).filePath("../../Komodo/PIRATE/PIRATE.conf"); #endif main->logger->write("Found zcashconf at " + QDir::cleanPath(confLocation)); @@ -566,7 +566,7 @@ bool ConnectionLoader::verifyParams() { } /** - * Try to automatically detect a zcash.conf file in the correct location and load parameters + * Try to automatically detect a PIRATE/PIRATE.conf file in the correct location and load parameters */ std::shared_ptr ConnectionLoader::autoDetectZcashConf() { auto confLocation = locateZcashConfFile(); @@ -625,7 +625,7 @@ std::shared_ptr ConnectionLoader::autoDetectZcashConf() { if (zcashconf->port.isEmpty()) zcashconf->port = "8232"; file.close(); - // In addition to the zcash.conf file, also double check the params. + // In addition to the PIRATE/PIRATE.conf file, also double check the params. return std::shared_ptr(zcashconf); } diff --git a/src/main.cpp b/src/main.cpp index 58a3bcd..2430f95 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -160,7 +160,7 @@ public: parser.addOption(noembeddedOption); // Positional argument will specify a zcash payment URI - parser.addPositionalArgument("zcashURI", "An optional zcash URI to pay"); + parser.addPositionalArgument("zcashURI", "An optional ARRR URI to pay"); parser.process(a); @@ -173,8 +173,8 @@ public: return 0; } - QCoreApplication::setOrganizationName("zec-qt-wallet-org"); - QCoreApplication::setApplicationName("zec-qt-wallet"); + QCoreApplication::setOrganizationName("pirate-black-org"); + QCoreApplication::setApplicationName("seven-seas"); QString locale = QLocale::system().name(); locale.truncate(locale.lastIndexOf('_')); // Get the language code @@ -218,7 +218,7 @@ public: } w = new MainWindow(); - w->setWindowTitle("ZecWallet v" + QString(APP_VERSION)); + w->setWindowTitle("SevenSeas v" + QString(APP_VERSION)); // If there was a payment URI on the command line, pay it if (parser.positionalArguments().length() > 0) { diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index cdf790a..75a02ed 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -538,7 +538,7 @@ void MainWindow::setupSettingsModal() { rpc->getConnection()->config->proxy = "proxy=127.0.0.1:9050"; QMessageBox::information(this, tr("Enable Tor"), - tr("Connection over Tor has been enabled. To use this feature, you need to restart ZecWallet."), + tr("Connection over Tor has been enabled. To use this feature, you need to restart SevenSeas."), QMessageBox::Ok); } @@ -548,7 +548,7 @@ void MainWindow::setupSettingsModal() { rpc->getConnection()->config->proxy.clear(); QMessageBox::information(this, tr("Disable Tor"), - tr("Connection over Tor has been disabled. To fully disconnect from Tor, you need to restart ZecWallet."), + tr("Connection over Tor has been disabled. To fully disconnect from Tor, you need to restart SevenSeas."), QMessageBox::Ok); } @@ -577,9 +577,9 @@ void MainWindow::setupSettingsModal() { } if (showRestartInfo) { - auto desc = tr("ZecWallet needs to restart to rescan/reindex. ZecWallet will now close, please restart ZecWallet to continue"); + auto desc = tr("SevenSeas needs to restart to rescan/reindex. SevenSeas will now close, please restart SevenSeas to continue"); - QMessageBox::information(this, tr("Restart ZecWallet"), desc, QMessageBox::Ok); + QMessageBox::information(this, tr("Restart SevenSeas"), desc, QMessageBox::Ok); QTimer::singleShot(1, [=]() { this->close(); }); } } @@ -609,9 +609,9 @@ void MainWindow::donate() { Settings::getInstance()->isSaplingAddress(ui->inputsCombo->currentText()))); ui->Address1->setCursorPosition(0); ui->Amount1->setText("0.01"); - ui->MemoTxt1->setText(tr("Thanks for supporting ZecWallet!")); + ui->MemoTxt1->setText(tr("Thanks for supporting SevenSeas!")); - ui->statusBar->showMessage(tr("Donate 0.01 ") % Settings::getTokenName() % tr(" to support ZecWallet")); + ui->statusBar->showMessage(tr("Donate 0.01 ") % Settings::getTokenName() % tr(" to support SevenSeas")); // And switch to the send tab. ui->tabWidget->setCurrentIndex(1); diff --git a/src/mainwindow.ui b/src/mainwindow.ui index e0e7a31..9c07c99 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -1144,7 +1144,7 @@ - Pay zcash &URI... + Pay Pirate &URI... @@ -1157,7 +1157,7 @@ - Request zcash... + Request Pirate... diff --git a/src/rpc.cpp b/src/rpc.cpp index 01f941d..af09d60 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -1112,7 +1112,7 @@ void RPC::shutdownZcashd() { Ui_ConnectionDialog connD; connD.setupUi(&d); connD.topIcon->setBasePixmap(QIcon(":/icons/res/icon.ico").pixmap(256, 256)); - connD.status->setText(QObject::tr("Please wait for ZecWallet to exit")); + connD.status->setText(QObject::tr("Please wait for SevenSeas to exit")); connD.statusDetail->setText(QObject::tr("Waiting for zcashd to exit")); QTimer waiter(main); diff --git a/src/settings.cpp b/src/settings.cpp index 9d7197a..b65896e 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -195,7 +195,7 @@ QString Settings::getTokenName() { if (Settings::getInstance()->isTestnet()) { return "TAZ"; } else { - return "ZEC"; + return "ARRR"; } } diff --git a/src/websockets.cpp b/src/websockets.cpp index f5c6bde..81f0156 100644 --- a/src/websockets.cpp +++ b/src/websockets.cpp @@ -356,7 +356,7 @@ QString AppDataServer::connDesc(AppConnectionType t) { return QObject::tr("Connected directly"); } else { - return QObject::tr("Connected over the internet via ZecWallet wormhole service"); + return QObject::tr("Connected over the internet via SevenSeas wormhole service"); } }