mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-17 05:22:31 -04:00
Added a confirm to the delete history action.
Added the RetroShare icon to the password input window. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4066 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
01f4244f24
commit
28ebbf0b2e
5 changed files with 62 additions and 46 deletions
|
@ -126,16 +126,24 @@ void NotifyQt::notifyOwnAvatarChanged()
|
|||
|
||||
std::string NotifyQt::askForPassword(const std::string& key_details,bool prev_is_bad)
|
||||
{
|
||||
|
||||
RsAutoUpdatePage::lockAllEvents() ;
|
||||
|
||||
std::string res = QInputDialog::getText(NULL, tr("GPG key passphrase"),
|
||||
(prev_is_bad?tr("Wrong password !") + "\n\n" : QString()) +
|
||||
tr("Please enter the password to unlock the following GPG key:") + "\n" + QString::fromStdString(key_details), QLineEdit::Password, NULL, NULL).toStdString();
|
||||
QInputDialog dialog;
|
||||
dialog.setWindowTitle(tr("GPG key passphrase"));
|
||||
dialog.setLabelText((prev_is_bad?tr("Wrong password !") + "\n\n" : QString()) +
|
||||
tr("Please enter the password to unlock the following GPG key:") + "\n" + QString::fromStdString(key_details));
|
||||
dialog.setTextEchoMode(QLineEdit::Password);
|
||||
dialog.setWindowIcon(QIcon(":/images/rstray3.png"));
|
||||
|
||||
int ret = dialog.exec();
|
||||
|
||||
RsAutoUpdatePage::unlockAllEvents() ;
|
||||
|
||||
return res ;
|
||||
if (ret) {
|
||||
return dialog.textValue().toStdString();
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
void NotifyQt::notifyDiscInfoChanged()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue