mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-16 09:03:51 -05:00
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:
parent
9f627783aa
commit
bbdb3b9614
5 changed files with 117 additions and 27 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue