mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 06:35:08 -04:00
Added doubleclick to join a lobby.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4857 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
cf5d88ab8b
commit
0cf53e993e
2 changed files with 11 additions and 17 deletions
|
@ -95,7 +95,6 @@ void ChatLobbyWidget::lobbyTreeWidgetCostumPopupMenu()
|
|||
contextMnu.addAction(QIcon(IMAGE_SUBSCRIBE), tr("Subscribe"), this, SLOT(subscribeItem()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
contextMnu.exec(QCursor::pos());
|
||||
}
|
||||
|
@ -273,9 +272,8 @@ void ChatLobbyWidget::createChatLobby()
|
|||
CreateLobbyDialog(friends).exec();
|
||||
}
|
||||
|
||||
void ChatLobbyWidget::subscribeItem()
|
||||
static void subscribeLobby(QTreeWidgetItem *item)
|
||||
{
|
||||
QTreeWidgetItem *item = lobbyTreeWidget->currentItem();
|
||||
if (item == NULL && item->type() != TYPE_LOBBY) {
|
||||
return;
|
||||
}
|
||||
|
@ -289,6 +287,11 @@ void ChatLobbyWidget::subscribeItem()
|
|||
}
|
||||
}
|
||||
|
||||
void ChatLobbyWidget::subscribeItem()
|
||||
{
|
||||
subscribeLobby(lobbyTreeWidget->currentItem());
|
||||
}
|
||||
|
||||
void ChatLobbyWidget::unsubscribeItem()
|
||||
{
|
||||
QTreeWidgetItem *item = lobbyTreeWidget->currentItem();
|
||||
|
@ -308,18 +311,7 @@ void ChatLobbyWidget::unsubscribeItem()
|
|||
|
||||
void ChatLobbyWidget::itemDoubleClicked(QTreeWidgetItem *item, int column)
|
||||
{
|
||||
// Each lobby can be joined directly, by calling
|
||||
// rsMsgs->joinPublicLobby(chatLobbyId) ;
|
||||
|
||||
// e.g. fill a list of public lobbies
|
||||
|
||||
// also maintain a list of active chat lobbies. Each active (subscribed) lobby has a lobby tab in the gui.
|
||||
// Each tab knows its lobby id and its virtual peer id (the one to send private chat messages to)
|
||||
//
|
||||
// One possibility is to convert ChatLobbyDialog to be used at a chat lobby tab.
|
||||
|
||||
// then the lobby can be accessed using the virtual peer id through
|
||||
// rsMsgs->getVirtualPeerId(ChatLobbyId,std::string& virtual_peer_id)
|
||||
subscribeLobby(item);
|
||||
}
|
||||
|
||||
void ChatLobbyWidget::displayChatLobbyEvent(qulonglong lobby_id, int event_type, const QString& nickname, const QString& str)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue