added retroshare certificate links: allows to paste certificates everywhere. Users need to click on them to launch the make friend wizard on the certificate. Certificates can be copied from each location of the Friends list

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4812 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-01-18 20:31:30 +00:00
parent 912e5339ca
commit 51cfb0c5fe
6 changed files with 373 additions and 191 deletions

View file

@ -382,6 +382,9 @@ void FriendList::peerTreeWidgetCostumPopupMenu()
contextMnu.addAction(QIcon(IMAGE_CONNECT), tr("Connect To Friend"), this, SLOT(connectfriend()));
if (type == TYPE_SSL) {
contextMnu.addAction(QIcon(IMAGE_COPYLINK), tr("Copy certificate link"), this, SLOT(copyFullCertificate()));
}
if (type == TYPE_GPG) {
contextMnu.addAction(QIcon(IMAGE_COPYLINK), tr("Copy RetroShare Link"), this, SLOT(copyLink()));
}
@ -1254,6 +1257,20 @@ void FriendList::pastePerson()
RSLinkClipboard::process(RetroShareLink::TYPE_PERSON);
}
void FriendList::copyFullCertificate()
{
QTreeWidgetItem *c = getCurrentPeer();
QList<RetroShareLink> urls;
RetroShareLink link ;
link.createCertificate(getRsId(c)) ;
urls.push_back(link);
std::cerr << "link: " << std::endl;
std::cerr<< link.toString().toStdString() << std::endl;
RSLinkClipboard::copyLinks(urls);
}
void FriendList::copyLink()
{
QTreeWidgetItem *c = getCurrentPeer();