mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-07 08:35:16 -04:00
Improvements to chat lobbies:
- added generic methods and items for bouncing generic objects through lobbies - added handling of peer typing status - proper handling of peer join/leave lobby - added sub item ids to lobby messages to allow proper message splitting - made 2 different message splitting methods for normal chat vs. lobbies. In v0.6, we'll have to handle all messages the same way. - added parent id to RsChatLobbyMsgItem, to allow threaded chat. - added possibility to make a lobby public/private (not yet fully working) - added items for requesting/exchanging list of public lobbies at friends' (not yet fully working) - major cleaning of p3chatservice.cc Next move: - gui for listing friend public lobbies, joining them, etc. - load/save of persistent lobbies. - autoremove of inactive lobbies Warning: lobby message items of this version are incompatible with previous versions. It won't crash, but messages will not pass through. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4755 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e430612714
commit
e9d6940b09
20 changed files with 965 additions and 296 deletions
|
@ -38,6 +38,7 @@
|
|||
|
||||
#include "channels/CreateChannel.h"
|
||||
#include "chat/PopupChatDialog.h"
|
||||
#include "chat/ChatLobbyDialog.h"
|
||||
#include "common/Emoticons.h"
|
||||
#include "common/vmessagebox.h"
|
||||
#include "connect/ConfCertDialog.h"
|
||||
|
@ -297,6 +298,16 @@ void FriendsDialog::updateStatusTyping()
|
|||
}
|
||||
}
|
||||
|
||||
void FriendsDialog::displayChatLobbyEvent(qulonglong lobby_id,int event_type,const QString& nickname,const QString& str)
|
||||
{
|
||||
std::cerr << "Received displayChatLobbyEvent()!" << std::endl;
|
||||
|
||||
std::string vpid ;
|
||||
if(rsMsgs->getVirtualPeerId(lobby_id,vpid))
|
||||
if( ChatLobbyDialog *cld = dynamic_cast<ChatLobbyDialog*>(PopupChatDialog::getExistingInstance(vpid)))
|
||||
cld->displayLobbyEvent(event_type,nickname,str) ;
|
||||
}
|
||||
|
||||
// Called by libretroshare through notifyQt to display the peer's status
|
||||
//
|
||||
void FriendsDialog::updateStatusString(const QString& peer_id, const QString& status_string)
|
||||
|
@ -317,7 +328,7 @@ void FriendsDialog::readChatLobbyInvites()
|
|||
rsMsgs->getPendingChatLobbyInvites(invites) ;
|
||||
|
||||
for(std::list<ChatLobbyInvite>::const_iterator it(invites.begin());it!=invites.end();++it)
|
||||
if(QMessageBox::Ok == QMessageBox::question(NULL,tr("Invitation to chat lobby"),QString::fromStdString((*it).peer_id)+QString(" invites you to chat lobby named ")+QString::fromUtf8((*it).lobby_name.c_str()),QMessageBox::Ok,QMessageBox::Ignore))
|
||||
if(QMessageBox::Ok == QMessageBox::question(NULL,tr("Invitation to chat lobby"),QString::fromUtf8(rsPeers->getPeerName((*it).peer_id).c_str())+QString(" invites you to chat lobby named ")+QString::fromUtf8((*it).lobby_name.c_str()),QMessageBox::Ok,QMessageBox::Ignore))
|
||||
{
|
||||
std::cerr << "Accepting invite to lobby " << (*it).lobby_name << std::endl;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue