1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

More descriptive dialog text

This commit is contained in:
Dubslow 2015-02-03 18:22:05 -06:00
parent e2fd298d68
commit 864d1297e7
No known key found for this signature in database
GPG Key ID: 3DB8E05315C220AA
2 changed files with 4 additions and 1 deletions

View File

@ -225,6 +225,7 @@ void Core::checkEncryptedHistory()
QString a(tr("Please enter the password for the chat history for the %1 profile.", "used in load() when no hist pw set").arg(Settings::getInstance().getCurrentProfile())); QString a(tr("Please enter the password for the chat history for the %1 profile.", "used in load() when no hist pw set").arg(Settings::getInstance().getCurrentProfile()));
QString b(tr("The previous password is incorrect; please try again:", "used on retries in load()")); QString b(tr("The previous password is incorrect; please try again:", "used on retries in load()"));
QString c(tr("Disabling chat history now will leave the encrypted history intact (but not usable); if you later remember the password, you may re-enable encryption from the Privacy tab with the correct password to use the history.", "part of history password dialog"));
QString dialogtxt; QString dialogtxt;
if (pwsaltedkeys[ptHistory]) if (pwsaltedkeys[ptHistory])
@ -235,6 +236,7 @@ void Core::checkEncryptedHistory()
} }
else else
dialogtxt = a; dialogtxt = a;
dialogtxt += "\n" + c;
if (pwsaltedkeys[ptMain]) if (pwsaltedkeys[ptMain])
{ {
@ -264,7 +266,7 @@ void Core::checkEncryptedHistory()
setPassword(pw, ptHistory, reinterpret_cast<uint8_t*>(salt.data())); setPassword(pw, ptHistory, reinterpret_cast<uint8_t*>(salt.data()));
error = exists && !HistoryKeeper::checkPassword(); error = exists && !HistoryKeeper::checkPassword();
dialogtxt = a + "\n" + b; dialogtxt = a + "\n" + c + "\n" + b;
} while (error); } while (error);
} }

View File

@ -1313,6 +1313,7 @@ QString Widget::passwordDialog(const QString& cancel, const QString& body)
if (!ret.isEmpty()) if (!ret.isEmpty())
return ret; return ret;
} }
dialog.setTextValue("");
dialog.setLabelText(body + "\n" + tr("You must enter a non-empty password.")); dialog.setLabelText(body + "\n" + tr("You must enter a non-empty password."));
} }
} }