mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
fixed popup of distant chat dialog, and display of peer names.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7406 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1c00055ea9
commit
be82951e2e
8 changed files with 32 additions and 98 deletions
|
@ -232,6 +232,7 @@ void p3Notify::notifyListChange (int list, int type) { FOR_ALL_NOTIFY_CLIENTS
|
|||
|
||||
void p3Notify::notifyErrorMsg (int list, int sev, std::string msg) { FOR_ALL_NOTIFY_CLIENTS (*it)->notifyErrorMsg(list,sev,msg) ; }
|
||||
void p3Notify::notifyChatStatus (const std::string& peer_id , const std::string& status_string ,bool is_private) { FOR_ALL_NOTIFY_CLIENTS (*it)->notifyChatStatus(peer_id,status_string,is_private) ; }
|
||||
void p3Notify::notifyChatShow (const std::string& peer_id) { FOR_ALL_NOTIFY_CLIENTS (*it)->notifyChatShow(peer_id) ; }
|
||||
|
||||
void p3Notify::notifyChatLobbyTimeShift (int time_shift) { FOR_ALL_NOTIFY_CLIENTS (*it)->notifyChatLobbyTimeShift(time_shift) ; }
|
||||
void p3Notify::notifyCustomState (const std::string& peer_id , const std::string& status_string ) { FOR_ALL_NOTIFY_CLIENTS (*it)->notifyCustomState (peer_id,status_string) ; }
|
||||
|
|
|
@ -99,6 +99,7 @@ class p3Notify: public RsNotify
|
|||
void notifyListChange (int /* list */, int /* type */) ;
|
||||
void notifyErrorMsg (int /* list */, int /* sev */, std::string /* msg */) ;
|
||||
void notifyChatStatus (const std::string& /* peer_id */, const std::string& /* status_string */ ,bool /* is_private */) ;
|
||||
void notifyChatShow (const std::string& /* peer_id */) ;
|
||||
void notifyChatLobbyEvent (uint64_t /* lobby id */, uint32_t /* event type */ ,const std::string& /* nickname */,const std::string& /* any string */) ;
|
||||
void notifyChatLobbyTimeShift (int /* time_shift*/) ;
|
||||
void notifyCustomState (const std::string& /* peer_id */, const std::string& /* status_string */) ;
|
||||
|
|
|
@ -183,6 +183,7 @@ class NotifyClient
|
|||
virtual void notifyListChange (int /* list */, int /* type */) {}
|
||||
virtual void notifyErrorMsg (int /* list */, int /* sev */, std::string /* msg */) {}
|
||||
virtual void notifyChatStatus (const std::string& /* peer_id */, const std::string& /* status_string */ ,bool /* is_private */) {}
|
||||
virtual void notifyChatShow (const std::string& /* peer_id */) {}
|
||||
virtual void notifyChatLobbyEvent (uint64_t /* lobby id */, uint32_t /* event type */ ,const std::string& /* nickname */,const std::string& /* any string */) {}
|
||||
virtual void notifyChatLobbyTimeShift (int /* time_shift*/) {}
|
||||
virtual void notifyCustomState (const std::string& /* peer_id */, const std::string& /* status_string */) {}
|
||||
|
|
|
@ -3214,19 +3214,18 @@ void p3ChatService::addVirtualPeer(const TurtleFileHash& hash,const TurtleVirtua
|
|||
info.status = RS_DISTANT_CHAT_STATUS_WAITING_DH ;
|
||||
}
|
||||
|
||||
RsChatMsgItem *item = new RsChatMsgItem;
|
||||
item->message = std::string("Tunnel is secured") ;
|
||||
item->PeerId(virtual_peer_id) ;
|
||||
item->chatFlags = RS_CHAT_FLAG_PRIVATE ;
|
||||
// RsChatMsgItem *item = new RsChatMsgItem;
|
||||
// item->message = std::string("Tunnel is secured") ;
|
||||
// item->PeerId(virtual_peer_id) ;
|
||||
// item->chatFlags = RS_CHAT_FLAG_PRIVATE ;
|
||||
//
|
||||
// privateIncomingList.push_back(item) ;
|
||||
|
||||
privateIncomingList.push_back(item) ;
|
||||
|
||||
if(dir == RsTurtleGenericTunnelItem::DIRECTION_SERVER)
|
||||
RsServer::notify()->AddPopupMessage(RS_POPUP_CHAT, virtual_peer_id.toStdString(), "Distant peer", "Conversation starts...");
|
||||
RsServer::notify()->AddPopupMessage(RS_POPUP_CHAT, virtual_peer_id.toStdString(), "Distant peer", "Conversation starts...");
|
||||
|
||||
// Notify the GUI that the tunnel is up.
|
||||
//
|
||||
RsServer::notify()->notifyChatStatus(virtual_peer_id.toStdString(),"tunnel is up again!",true) ;
|
||||
RsServer::notify()->notifyChatShow(virtual_peer_id.toStdString()) ;
|
||||
}
|
||||
|
||||
void p3ChatService::removeVirtualPeer(const TurtleFileHash& hash,const TurtleVirtualPeerId& virtual_peer_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue