mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-14 12:02:29 -04:00
small corrections.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-ChatLobby@4695 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
6c93253050
commit
b01470c639
7 changed files with 33 additions and 4 deletions
|
@ -349,7 +349,7 @@ void FriendList::peerTreeWidgetCostumPopupMenu()
|
|||
mnu->addAction(inviteToLobbyAction);
|
||||
}
|
||||
|
||||
mnu->addAction(QIcon(IMAGE_CHAT),tr("create new")) ;
|
||||
mnu->addAction(QIcon(IMAGE_CHAT),tr("create new"),this,SLOT(createchatlobby())) ;
|
||||
|
||||
contextMnu.addAction(QIcon(IMAGE_MSG), tr("Message Friend"), this, SLOT(msgfriend()));
|
||||
|
||||
|
@ -1414,6 +1414,26 @@ void FriendList::inviteToLobby()
|
|||
rsMsgs->invitePeerToLobby(ChatLobbyId(QString::fromStdString(lobby_id).toULongLong()), peer_id);
|
||||
}
|
||||
|
||||
void FriendList::createchatlobby()
|
||||
{
|
||||
QTreeWidgetItem *c = getCurrentPeer();
|
||||
|
||||
if (c == NULL)
|
||||
return;
|
||||
|
||||
std::list<std::string> friend_list ;
|
||||
|
||||
std::string peer_id = getRsId(c) ;
|
||||
friend_list.push_back(peer_id) ;
|
||||
|
||||
std::string lobby_name = "New lobby (Plz add the code to select this name at creation time)" ;
|
||||
|
||||
// add to group
|
||||
ChatLobbyId id = rsMsgs->createChatLobby(lobby_name, friend_list);
|
||||
|
||||
std::cerr << "gui: Created chat lobby " << std::hex << id << std::endl ;
|
||||
}
|
||||
|
||||
void FriendList::addToGroup()
|
||||
{
|
||||
QTreeWidgetItem *c = getCurrentPeer();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue