changes to support i8n in the gui (chat and messages)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@318 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-01-26 13:08:28 +00:00
parent bfb0b2be2b
commit f9d6f1c418
9 changed files with 734 additions and 397 deletions

View file

@ -336,11 +336,24 @@ void PeersDialog::chatfriend()
if (!i)
return;
std::string status = (i -> text(1)).toStdString();
std::string name = (i -> text(2)).toStdString();
std::string id = (i -> text(10)).toStdString();
RsPeerDetails detail;
if (!rsPeers->getPeerDetails(id, detail))
{
return;
}
if (status != "Online")
if (detail.state & RS_PEER_STATE_CONNECTED)
{
/* must reference ChatDialog */
if (chatDialog)
{
chatDialog->getPrivateChat(id, name, true);
}
}
else
{
/* info dialog */
QMessageBox::StandardButton sb = QMessageBox::question ( NULL,
@ -351,16 +364,11 @@ void PeersDialog::chatfriend()
{
msgfriend();
}
return;
}
/* must reference ChatDialog */
if (chatDialog)
{
chatDialog->getPrivateChat(id, name, true);
}
return;
}
void PeersDialog::msgfriend()
{
std::cerr << "SharedFilesDialog::msgfriend()" << std::endl;