Added welcome message to the chat lobby.

Fixed german language.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5043 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-03-20 23:05:17 +00:00
parent 9f627783aa
commit bbdb3b9614
5 changed files with 117 additions and 27 deletions

View file

@ -48,6 +48,24 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::WF
void ChatLobbyDialog::init(const std::string &peerId, const QString &title)
{
std::list<ChatLobbyInfo> lobbies;
rsMsgs->getChatLobbyList(lobbies);
std::list<ChatLobbyInfo>::const_iterator lobbyIt;
for (lobbyIt = lobbies.begin(); lobbyIt != lobbies.end(); ++lobbyIt) {
std::string vpid;
if (rsMsgs->getVirtualPeerId(lobbyIt->lobby_id, vpid)) {
if (vpid == peerId) {
QString msg = tr("Welcome to lobby %1").arg(QString::fromUtf8(lobbyIt->lobby_name.c_str()));
if (!lobbyIt->lobby_topic.empty()) {
msg += "\n" + tr("Topic: %1").arg(QString::fromUtf8(lobbyIt->lobby_topic.c_str()));
}
ui.chatWidget->setWelcomeMessage(msg);
break;
}
}
}
ChatDialog::init(peerId, title);
std::string nickName;