basic gui entry for creating a chat link. Fixed a few bugs

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-GenericTunneling@6302 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-04-10 21:21:52 +00:00
parent 43b9117293
commit d0703df7e3
8 changed files with 78 additions and 23 deletions
retroshare-gui/src/gui

View file

@ -28,6 +28,7 @@
#include <retroshare/rsiface.h>
#include <retroshare/rspeers.h>
#include <retroshare/rsdisc.h>
#include <retroshare/rsmsgs.h>
#include "common/vmessagebox.h"
#include "common/RSTreeWidgetItem.h"
@ -230,6 +231,11 @@ void NetworkDialog::connecttreeWidgetCostumPopupMenu( QPoint /*point*/ )
connect( makefriendAct , SIGNAL( triggered() ), this, SLOT( makeFriend() ) );
contextMnu->addAction( makefriendAct);
QAction* createChatLinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Create a distant chat invitation..." ), contextMnu );
connect( createChatLinkAct , SIGNAL( triggered() ), this, SLOT( createChatLink() ) );
contextMnu->addAction( createChatLinkAct);
#ifdef TODO
if(detail.validLvl > RS_TRUST_LVL_MARGINAL) // it's a denied old friend.
{
@ -285,6 +291,19 @@ void NetworkDialog::makeFriend()
ConfCertDialog::showIt(getCurrentNeighbour()->text(COLUMN_PEERID).toStdString(), ConfCertDialog::PageTrust);
}
void NetworkDialog::createChatLink()
{
std::string pgp_id = getCurrentNeighbour()->text(COLUMN_PEERID).toStdString() ;
std::cerr << "Creating chat link for pgp id " << pgp_id << std::endl;
std::string hash,estr ;
rsMsgs->createDistantChatInvite(pgp_id,time(NULL)+3600,estr) ;
std::cerr << "Created invite:" << std::endl;
std::cerr << " estr = " << estr << std::endl;
}
/** Shows Peer Information/Auth Dialog */
void NetworkDialog::peerdetails()
{