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:
thunder2 2011-02-27 21:47:49 +00:00
parent 01f4244f24
commit 28ebbf0b2e
5 changed files with 62 additions and 46 deletions

View file

@ -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()