- started changing distant chat so that it works with GXS ids instead of PGP ids. Something is still broken in

service control. Crypto is not done yet => distant chat is unencrypted.
- changed GUI for distant chat. Removed invitation system.
- added menu item to distant chat GXS ids from IdentityItem (only entry point for now).
- fixed bug in chat lobbies causing re-connexion of lobbies not to happen everytime (bug reported bu Lain)



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7378 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2014-05-25 21:43:05 +00:00
parent d18878aa9c
commit b6c68d1812
22 changed files with 340 additions and 762 deletions

View file

@ -25,6 +25,7 @@
#include <retroshare/rsstatus.h>
#include <retroshare/rspeers.h>
#include <retroshare/rsidentity.h>
#include "RsAutoUpdatePage.h"
#include "PopupDistantChatDialog.h"
@ -74,8 +75,8 @@ void PopupDistantChatDialog::updateDisplay()
//
uint32_t status= RS_DISTANT_CHAT_STATUS_UNKNOWN;
RsPgpId pgp_id ;
rsMsgs->getDistantChatStatus(_pid,status,pgp_id) ;
RsGxsId gxs_id ;
rsMsgs->getDistantChatStatus(_pid,gxs_id,status) ;
switch(status)
{
@ -116,8 +117,8 @@ void PopupDistantChatDialog::closeEvent(QCloseEvent *e)
//std::cerr << "Closing window => closing distant chat for hash " << _pid << std::endl;
uint32_t status= RS_DISTANT_CHAT_STATUS_UNKNOWN;
RsPgpId pgp_id ;
rsMsgs->getDistantChatStatus(_pid,status,pgp_id) ;
RsGxsId gxs_id ;
rsMsgs->getDistantChatStatus(_pid,gxs_id,status) ;
if(status != RS_DISTANT_CHAT_STATUS_REMOTELY_CLOSED)
{
@ -140,10 +141,21 @@ void PopupDistantChatDialog::closeEvent(QCloseEvent *e)
QString PopupDistantChatDialog::getPeerName(const DistantChatPeerId &id) const
{
uint32_t status ;
RsPgpId pgp_id ;
RsGxsId gxs_id ;
if(rsMsgs->getDistantChatStatus(id,status,pgp_id))
return QString::fromStdString(rsPeers->getGPGName(pgp_id)) ;
if(rsMsgs->getDistantChatStatus(id,gxs_id,status))
{
RsIdentityDetails details ;
for(int i=0;i<3;++i)
if(rsIdentity->getIdDetails(gxs_id,details))
return QString::fromUtf8( details.mNickname.c_str() ) ;
else
usleep(500000) ; // sleep for 500 msec.
return QString::fromStdString(id.toStdString()) ;
}
else
return ChatDialog::getPeerName(id) ;
}