mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -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
@ -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)
|
||||
|
@ -163,6 +163,9 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="itemsExpandable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="allColumnsShowFocus">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="expandsOnDoubleClick">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@ -174,8 +177,7 @@ p, li { white-space: pre-wrap; }
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QWidget" name="lobbyInfo">
|
||||
</widget>
|
||||
<widget class="QWidget" name="lobbyInfo" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
Loading…
Reference in New Issue
Block a user