Skip to content

Commit

Permalink
initial rebrand for HUSH
Browse files Browse the repository at this point in the history
  • Loading branch information
radix42 committed May 9, 2019
1 parent d3e8bd0 commit 6d03843
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion src/about.ui
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string notr="true">SevenSeas</string>
<string notr="true">SilentDragon</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
Expand Down
34 changes: 17 additions & 17 deletions src/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,29 +75,29 @@ void ConnectionLoader::doAutoConnect(bool tryEzcashdStart) {
QString explanation;
if (config->zcashDaemon) {
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"
"with SilentDragon\n\n."
"Please remove the following line from your HUSH3.conf and restart SilentDragon\n"
"daemon=1");
} else {
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"
"Please try restarting.\n\nIf you previously started komodod with custom arguments, you might need to reset HUSH3.conf.\n\n"
"If all else fails, please run zcashd manually.") %
(ezcashd ? QObject::tr("The process returned") + ":\n\n" % ezcashd->errorString() : QString(""));
}

this->showError(explanation);
}
} else {
// PIRATE.conf exists, there's no connection, and the user asked us not to start zcashd. Error!
// HUSH3.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 PIRATE.conf.\n\n"
QString explanation = QString() % QObject::tr("Couldn't connect to zcashd configured in HUSH3.conf.\n\n"
"Not starting embedded zcashd because --no-embedded was passed");
this->showError(explanation);
}
});
} else {
if (Settings::getInstance()->useEmbedded()) {
// PIRATE.conf was not found, so create one
// HUSH3.conf was not found, so create one
createZcashConf();
} else {
// Fall back to manual connect
Expand All @@ -124,7 +124,7 @@ QString randomPassword() {
}

/**
* This will create a new PIRATE.conf, download Zcash parameters.
* This will create a new HUSH3.conf, download Zcash parameters.
*/
void ConnectionLoader::createZcashConf() {
main->logger->write("createZcashConf");
Expand Down Expand Up @@ -175,7 +175,7 @@ void ConnectionLoader::createZcashConf() {

QFile file(confLocation);
if (!file.open(QIODevice::ReadWrite | QIODevice::Truncate)) {
main->logger->write("Could not create PIRATE.conf, returning");
main->logger->write("Could not create HUSH3.conf, returning");
return;
}

Expand All @@ -194,7 +194,7 @@ void ConnectionLoader::createZcashConf() {

file.close();

// Now that PIRATE.conf exists, try to autoconnect again
// Now that HUSH3.conf exists, try to autoconnect again
this->doAutoConnect();
}

Expand Down Expand Up @@ -511,11 +511,11 @@ void ConnectionLoader::showError(QString explanation) {

QString ConnectionLoader::locateZcashConfFile() {
#ifdef Q_OS_LINUX
auto confLocation = QStandardPaths::locate(QStandardPaths::HomeLocation, ".komodo/PIRATE/PIRATE.conf");
auto confLocation = QStandardPaths::locate(QStandardPaths::HomeLocation, ".komodo/HUSH3/HUSH3.conf");
#elif defined(Q_OS_DARWIN)
auto confLocation = QStandardPaths::locate(QStandardPaths::HomeLocation, "Library/Application Support/Komodo/PIRATE/PIRATE.conf");
auto confLocation = QStandardPaths::locate(QStandardPaths::HomeLocation, "Library/Application Support/Komodo/HUSH3/HUSH3.conf");
#else
auto confLocation = QStandardPaths::locate(QStandardPaths::AppDataLocation, "../../Komodo/PIRATE/PIRATE.conf");
auto confLocation = QStandardPaths::locate(QStandardPaths::AppDataLocation, "../../Komodo/HUSH3/HUSH3.conf");
#endif

main->logger->write("Found zcashconf at " + QDir::cleanPath(confLocation));
Expand All @@ -524,11 +524,11 @@ QString ConnectionLoader::locateZcashConfFile() {

QString ConnectionLoader::zcashConfWritableLocation() {
#ifdef Q_OS_LINUX
auto confLocation = QDir(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)).filePath(".komodo/PIRATE/PIRATE.conf");
auto confLocation = QDir(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)).filePath(".komodo/HUSH3/HUSH3.conf");
#elif defined(Q_OS_DARWIN)
auto confLocation = QDir(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)).filePath("Library/Application Support/Zcash/PIRATE/PIRATE.conf");
auto confLocation = QDir(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)).filePath("Library/Application Support/Zcash/HUSH3/HUSH3.conf");
#else
auto confLocation = QDir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)).filePath("../../Komodo/PIRATE/PIRATE.conf");
auto confLocation = QDir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)).filePath("../../Komodo/HUSH3/HUSH3.conf");
#endif

main->logger->write("Found zcashconf at " + QDir::cleanPath(confLocation));
Expand Down Expand Up @@ -566,7 +566,7 @@ bool ConnectionLoader::verifyParams() {
}

/**
* Try to automatically detect a PIRATE/PIRATE.conf file in the correct location and load parameters
* Try to automatically detect a HUSH3/HUSH3.conf file in the correct location and load parameters
*/
std::shared_ptr<ConnectionConfig> ConnectionLoader::autoDetectZcashConf() {
auto confLocation = locateZcashConfFile();
Expand Down Expand Up @@ -625,7 +625,7 @@ std::shared_ptr<ConnectionConfig> ConnectionLoader::autoDetectZcashConf() {
if (zcashconf->port.isEmpty()) zcashconf->port = "8232";
file.close();

// In addition to the PIRATE/PIRATE.conf file, also double check the params.
// In addition to the HUSH3/HUSH3.conf file, also double check the params.

return std::shared_ptr<ConnectionConfig>(zcashconf);
}
Expand Down
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class Application : public SignalHandler
parser.addOption(noembeddedOption);

// Positional argument will specify a zcash payment URI
parser.addPositionalArgument("zcashURI", "An optional ARRR URI to pay");
parser.addPositionalArgument("zcashURI", "An optional HUSH URI to pay");

parser.process(a);

Expand Down Expand Up @@ -218,7 +218,7 @@ class Application : public SignalHandler
}

w = new MainWindow();
w->setWindowTitle("SevenSeas v" + QString(APP_VERSION));
w->setWindowTitle("SilentDragon v" + QString(APP_VERSION));

// If there was a payment URI on the command line, pay it
if (parser.positionalArguments().length() > 0) {
Expand Down
16 changes: 8 additions & 8 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 SevenSeas."),
tr("Connection over Tor has been enabled. To use this feature, you need to restart SilentDragon."),
QMessageBox::Ok);
}

Expand All @@ -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 SevenSeas."),
tr("Connection over Tor has been disabled. To fully disconnect from Tor, you need to restart SilentDragon."),
QMessageBox::Ok);
}

Expand Down Expand Up @@ -577,9 +577,9 @@ void MainWindow::setupSettingsModal() {
}

if (showRestartInfo) {
auto desc = tr("SevenSeas needs to restart to rescan/reindex. SevenSeas will now close, please restart SevenSeas to continue");
auto desc = tr("SilentDragon needs to restart to rescan/reindex. SilentDragon will now close, please restart SilentDragon to continue");

QMessageBox::information(this, tr("Restart SevenSeas"), desc, QMessageBox::Ok);
QMessageBox::information(this, tr("Restart SilentDragon"), desc, QMessageBox::Ok);
QTimer::singleShot(1, [=]() { this->close(); });
}
}
Expand Down Expand Up @@ -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 SevenSeas!"));
ui->MemoTxt1->setText(tr("Thanks for supporting SilentDragon!"));

ui->statusBar->showMessage(tr("Donate 0.01 ") % Settings::getTokenName() % tr(" to support SevenSeas"));
ui->statusBar->showMessage(tr("Donate 0.01 ") % Settings::getTokenName() % tr(" to support SilentDragon"));

// And switch to the send tab.
ui->tabWidget->setCurrentIndex(1);
Expand Down Expand Up @@ -807,8 +807,8 @@ void MainWindow::payZcashURI(QString uri, QString myAddr) {

// If there was no URI passed, ask the user for one.
if (uri.isEmpty()) {
uri = QInputDialog::getText(this, tr("Paste Pirate URI"),
"Pirate URI" + QString(" ").repeated(180));
uri = QInputDialog::getText(this, tr("Paste HUSH URI"),
"HUSH URI" + QString(" ").repeated(180));
}

// If there's no URI, just exit
Expand Down
4 changes: 2 additions & 2 deletions src/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@
</action>
<action name="actionPay_URI">
<property name="text">
<string>Pay Pirate &amp;URI...</string>
<string>Pay HUSH &amp;URI...</string>
</property>
</action>
<action name="actionConnect_Mobile_App">
Expand All @@ -1159,7 +1159,7 @@
</action>
<action name="actionRequest_zcash">
<property name="text">
<string>Request Pirate...</string>
<string>Request HUSH...</string>
</property>
</action>
</widget>
Expand Down
2 changes: 1 addition & 1 deletion src/requestdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void RequestDialog::setupDialog(MainWindow* main, QDialog* d, Ui_RequestDialog*
void RequestDialog::showPaymentConfirmation(MainWindow* main, QString paymentURI) {
PaymentURI payInfo = Settings::parseURI(paymentURI);
if (!payInfo.error.isEmpty()) {
QMessageBox::critical(main, tr("Error paying Pirate URI"),
QMessageBox::critical(main, tr("Error paying HUSH URI"),
tr("URI should be of the form 'pirate:<addr>?amt=x&memo=y") + "\n" + payInfo.error);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/requestdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
<item row="0" column="2" colspan="2">
<widget class="QLabel" name="lblHeader">
<property name="text">
<string>Request payment from a Sapling address. You'll send a ARRR 0.0001 transaction to the address with a Pirate payment URI. The memo will be included in the transaction when the address pays you.</string>
<string>Request payment from a Sapling address. You'll send a HUSH 0.0001 transaction to the address with a HUSH payment URI. The memo will be included in the transaction when the address pays you.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
Expand Down
8 changes: 4 additions & 4 deletions src/rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ void RPC::checkForUpdate(bool silent) {
if (conn == nullptr)
return noConnection();

QUrl cmcURL("https://api.github.com/repos/radix42/SevenSeas/releases");
QUrl cmcURL("https://api.github.com/repos/radix42/SilentDragon/releases");

QNetworkRequest req;
req.setUrl(cmcURL);
Expand Down Expand Up @@ -1017,7 +1017,7 @@ void RPC::checkForUpdate(bool silent) {
.arg(currentVersion.toString()),
QMessageBox::Yes, QMessageBox::Cancel);
if (ans == QMessageBox::Yes) {
QDesktopServices::openUrl(QUrl("https://github.com/radix42/SevenSeas/releases"));
QDesktopServices::openUrl(QUrl("https://github.com/radix42/SilentDragon/releases"));
} else {
// If the user selects cancel, don't bother them again for this version
s.setValue("update/lastversion", maxVersion.toString());
Expand Down Expand Up @@ -1077,7 +1077,7 @@ void RPC::refreshZECPrice() {
const json& item = parsed.get<json::object_t>();
if (item["coin"].get<json::string_t>() == "PIRATE") {
QString price = QString::fromStdString(item["priceUSD"].get<json::string_t>());
qDebug() << "ARRR Price=" << price;
qDebug() << "HUSH Price=" << price;
Settings::getInstance()->setZECPrice(price.toDouble());

return;
Expand Down Expand Up @@ -1113,7 +1113,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 SevenSeas to exit"));
connD.status->setText(QObject::tr("Please wait for SilentDragon to exit"));
connD.statusDetail->setText(QObject::tr("Waiting for zcashd to exit"));

QTimer waiter(main);
Expand Down
4 changes: 2 additions & 2 deletions src/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ QString Settings::getTokenName() {
if (Settings::getInstance()->isTestnet()) {
return "TAZ";
} else {
return "ARRR";
return "HUSH";
}
}

Expand Down Expand Up @@ -297,7 +297,7 @@ PaymentURI Settings::parseURI(QString uri) {
PaymentURI ans;

if (!uri.startsWith("pirate:")) {
ans.error = "Not a Pirate payment URI";
ans.error = "Not a HUSH payment URI";
return ans;
}

Expand Down
2 changes: 1 addition & 1 deletion src/websockets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ QString AppDataServer::connDesc(AppConnectionType t) {
return QObject::tr("Connected directly");
}
else {
return QObject::tr("Connected over the internet via SevenSeas wormhole service");
return QObject::tr("Connected over the internet via SilentDragon wormhole service");
}
}

Expand Down
2 changes: 1 addition & 1 deletion zec-qt-wallet.pro
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ PRECOMPILED_HEADER = src/precompiled.h
QT += widgets
QT += websockets

TARGET = sevenseas
TARGET = silentdragon

TEMPLATE = app

Expand Down

0 comments on commit 6d03843

Please sign in to comment.