Browse Source

Fix names of export files and some tooltips/error messages

pull/45/head
Jonathan "Duke" Leto 5 years ago
parent
commit
3ee0592b12
  1. 25
      src/mainwindow.cpp

25
src/mainwindow.cpp

@ -450,7 +450,7 @@ void MainWindow::setupSettingsModal() {
// Setup clear button
QObject::connect(settings.btnClearSaved, &QCheckBox::clicked, [=]() {
if (QMessageBox::warning(this, "Clear saved history?",
"Shielded z-Address transactions are stored locally in your wallet, outside zcashd. You may delete this saved information safely any time for your privacy.\nDo you want to delete the saved shielded transactions now?",
"Shielded z-Address transactions are stored locally in your wallet, outside hushd. You may delete this saved information safely any time for your privacy.\nDo you want to delete the saved shielded transactions now?",
QMessageBox::Yes, QMessageBox::Cancel)) {
SentTxStore::deleteHistory();
// Reload after the clear button so existing txs disappear
@ -476,7 +476,7 @@ void MainWindow::setupSettingsModal() {
if (rpc->getEZcashD() == nullptr) {
settings.chkTor->setEnabled(false);
settings.lblTor->setEnabled(false);
QString tooltip = tr("Tor configuration is available only when running an embedded zcashd.");
QString tooltip = tr("Tor configuration is available only when running an embedded hushd.");
settings.chkTor->setToolTip(tooltip);
settings.lblTor->setToolTip(tooltip);
}
@ -485,7 +485,7 @@ void MainWindow::setupSettingsModal() {
QIntValidator validator(0, 65535);
settings.port->setValidator(&validator);
// If values are coming from zcash.conf, then disable all the fields
// If values are coming from HUSH3.conf, then disable all the fields
auto zcashConfLocation = Settings::getInstance()->getZcashdConfLocation();
if (!zcashConfLocation.isEmpty()) {
settings.confMsg->setText("Settings are being read from \n" + zcashConfLocation);
@ -493,9 +493,8 @@ void MainWindow::setupSettingsModal() {
settings.port->setEnabled(false);
settings.rpcuser->setEnabled(false);
settings.rpcpassword->setEnabled(false);
}
else {
settings.confMsg->setText("No local zcash.conf found. Please configure connection manually.");
} else {
settings.confMsg->setText("No local HUSH3.conf found. Please configure connection manually.");
settings.hostname->setEnabled(true);
settings.port->setEnabled(true);
settings.rpcuser->setEnabled(true);
@ -512,13 +511,13 @@ void MainWindow::setupSettingsModal() {
// Connection tab by default
settings.tabWidget->setCurrentIndex(0);
// Enable the troubleshooting options only if using embedded zcashd
// Enable the troubleshooting options only if using embedded hushd
if (!rpc->isEmbedded()) {
settings.chkRescan->setEnabled(false);
settings.chkRescan->setToolTip(tr("You're using an external zcashd. Please restart zcashd with -rescan"));
settings.chkRescan->setToolTip(tr("You're using an external hushd. Please restart hushd with -rescan"));
settings.chkReindex->setEnabled(false);
settings.chkReindex->setToolTip(tr("You're using an external zcashd. Please restart zcashd with -reindex"));
settings.chkReindex->setToolTip(tr("You're using an external hushd. Please restart hushd with -reindex"));
}
if (settingsDialog.exec() == QDialog::Accepted) {
@ -887,7 +886,7 @@ void MainWindow::importPrivKey() {
*/
void MainWindow::exportTransactions() {
// First, get the export file name
QString exportName = "zcash-transactions-" + QDateTime::currentDateTime().toString("yyyyMMdd") + ".csv";
QString exportName = "hush-transactions-" + QDateTime::currentDateTime().toString("yyyyMMdd") + ".csv";
QUrl csvName = QFileDialog::getSaveFileUrl(this,
tr("Export transactions"), exportName, "CSV file (*.csv)");
@ -903,14 +902,14 @@ void MainWindow::exportTransactions() {
/**
* Backup the wallet.dat file. This is kind of a hack, since it has to read from the filesystem rather than an RPC call
* This might fail for various reasons - Remote zcashd, non-standard locations, custom params passed to zcashd, many others
* This might fail for various reasons - Remote hushd, non-standard locations, custom params passed to hushd, many others
*/
void MainWindow::backupWalletDat() {
if (!rpc->getConnection())
return;
QDir zcashdir(rpc->getConnection()->config->zcashDir);
QString backupDefaultName = "zcash-wallet-backup-" + QDateTime::currentDateTime().toString("yyyyMMdd") + ".dat";
QString backupDefaultName = "hush-wallet-backup-" + QDateTime::currentDateTime().toString("yyyyMMdd") + ".dat";
if (Settings::getInstance()->isTestnet()) {
zcashdir.cd("testnet3");
@ -920,7 +919,7 @@ void MainWindow::backupWalletDat() {
QFile wallet(zcashdir.filePath("wallet.dat"));
if (!wallet.exists()) {
QMessageBox::critical(this, tr("No wallet.dat"), tr("Couldn't find the wallet.dat on this computer") + "\n" +
tr("You need to back it up from the machine zcashd is running on"), QMessageBox::Ok);
tr("You need to back it up from the machine hushd is running on"), QMessageBox::Ok);
return;
}

Loading…
Cancel
Save