QStringa(tr("Please enter the password for the chat history for the profile \"%1\".","used in load()whennohistpwset").arg(Nexus::getProfile()->getName()));
QStringb(tr("The previous password is incorrect; please try again:","used on retries in load()"));
QStringc(tr("\nDisabling chat history now will leave the encrypted history intact (but not usable);ifyoulaterrememberthepassword,youmayre-enableencryptionfromthePrivacytabwiththecorrectpasswordtousethehistory.", "partofhistorypassworddialog"));
QStringdialogtxt;
if(pwsaltedkeys[ptHistory])
{
if(!exists||HistoryKeeper::checkPassword())
return;
dialogtxt=tr("The chat history password failed. Please try another?","used only when pw set before load() doesn't work");
}
else
{
dialogtxt=a;
}
if(!exists||HistoryKeeper::checkPassword())
return;
dialogtxt=tr("The chat history password failed. Please try another?","used only when pw set before load() doesn't work");
GUI::showWarning(tr("Successfully decrypted old chat history","popup title"),tr("You have succesfully decrypted the old chat history, and it has been added to your current history and re-encrypted.","popup text"));
}
deletedialog;
returntrue;
}
else
{
if(GUI::askQuestion(tr("Old encrypted chat history","popup title"),tr("There is currently an unused encrypted chat history, but the password you just entered doesn't match.\n\nIf you don't care about the old history, you may delete it and use the password you just entered.\nOtherwise, hit Cancel to try again.","This happens when enabling encryption after previously \"Disabling History\""),tr("Delete"),tr("Cancel")))
{
if(GUI::askQuestion(tr("Old encrypted chat history","popup title"),tr("Are you absolutely sure you want to lose the unused encrypted chat history?","secondary popup"),tr("Delete"),tr("Cancel")))
haveEncHist=false;// logically this is really just a `break`, but conceptually this is more accurate
}
}
}while(haveEncHist);
deletedialog;
returnfalse;
}
voidPrivacyForm::onEncryptLogsUpdated()
{
Core*core=Core::getInstance();
if(bodyUI->cbEncryptHistory->isChecked())
{
if(!core->isPasswordSet(Core::ptHistory))
{
if(setChatLogsPassword())
{
bodyUI->cbEncryptHistory->setChecked(true);
bodyUI->changeLogsPwButton->setEnabled(true);
return;
}
}
}
else
{
QMessageBoxbox(QMessageBox::Warning,
tr("Old encrypted chat history","title"),
tr("Would you like to decrypt your chat history?\nOtherwise it will be deleted."),
<string>All Tox communications over the internet are encrypted, and this cannot be disabled. However, you may optionally password protect your local Tox files.</string>
<string>The NoSpam is part of your Tox ID, if you are getting spammed with friend requests, change the NoSpam.</string>
@ -153,7 +96,7 @@ but new contacts need to know your new Tox ID to be able to add you.</string>
@@ -153,7 +96,7 @@ but new contacts need to know your new Tox ID to be able to add you.</string>