Changed the generation of the gpg key and location to utf8.

The existing gpg keys and locations with umlauts are now shown wrong. The changes are not backward compatible.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4460 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-07-17 23:07:29 +00:00
parent 7d4b8288ca
commit 8d4a4db027
32 changed files with 103 additions and 118 deletions

View file

@ -131,7 +131,7 @@ std::string NotifyQt::askForPassword(const std::string& key_details,bool prev_is
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));
tr("Please enter the password to unlock the following GPG key:") + "\n" + QString::fromUtf8(key_details.c_str()));
dialog.setTextEchoMode(QLineEdit::Password);
dialog.setWindowIcon(QIcon(":/images/rstray3.png"));
@ -454,16 +454,14 @@ void NotifyQt::UpdateGUI()
Toaster *toaster = NULL;
/* id the name */
std::string name;
std::string realmsg;
QString name;
unsigned char *data = NULL;
int size = 0 ;
if (type == RS_POPUP_DOWNLOAD) {
/* id = file hash */
} else {
name = rsPeers->getPeerName(id);
realmsg = "<strong>" + name + "</strong>";
name = QString::fromUtf8(rsPeers->getPeerName(id).c_str());
rsMsgs->getAvatarData(id,data,size);
}
@ -473,7 +471,7 @@ void NotifyQt::UpdateGUI()
case RS_POPUP_MSG:
if (popupflags & RS_POPUP_MSG)
{
toaster = new Toaster(new MessageToaster(QString::fromStdString(realmsg), QString::fromStdString(title), QString::fromStdString(msg)));
toaster = new Toaster(new MessageToaster(name, QString::fromUtf8(title.c_str()), QString::fromStdString(msg)));
}
break;
case RS_POPUP_CONNECT:
@ -490,7 +488,7 @@ void NotifyQt::UpdateGUI()
avatar = QPixmap(":/images/user/personal64.png");
}
toaster = new Toaster(new OnlineToaster(id, QString::fromStdString(realmsg), avatar));
toaster = new Toaster(new OnlineToaster(id, name, avatar));
}
break;
case RS_POPUP_DOWNLOAD: