mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-04 07:05:26 -04:00
added paste own certificate to chat/forum context menu (patch from AC)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5125 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d28ffb9c0d
commit
32ac7efb42
4 changed files with 25 additions and 0 deletions
|
@ -357,6 +357,17 @@ void ChatWidget::pasteLink()
|
|||
ui->chattextEdit->insertHtml(RSLinkClipboard::toHtml());
|
||||
}
|
||||
|
||||
void ChatWidget::pasteOwnCertificateLink()
|
||||
{
|
||||
std::cerr << "In paste own certificate link" << std::endl;
|
||||
RetroShareLink link ;
|
||||
std::string ownId = rsPeers->getOwnId() ;
|
||||
|
||||
if( link.createCertificate(ownId) ) {
|
||||
ui->chattextEdit->insertHtml(link.toHtml() + " ");
|
||||
}
|
||||
}
|
||||
|
||||
void ChatWidget::contextMenu(QPoint /*point*/)
|
||||
{
|
||||
std::cerr << "In context menu" << std::endl;
|
||||
|
@ -366,6 +377,7 @@ void ChatWidget::contextMenu(QPoint /*point*/)
|
|||
contextMnu->addSeparator();
|
||||
QAction *action = contextMnu->addAction(QIcon(":/images/pasterslink.png"), tr("Paste RetroShare Link"), this, SLOT(pasteLink()));
|
||||
action->setDisabled(RSLinkClipboard::empty());
|
||||
contextMnu->addAction(QIcon(":/images/pasterslink.png"), tr("Paste own certificate link"), this, SLOT(pasteOwnCertificateLink()));
|
||||
|
||||
contextMnu->exec(QCursor::pos());
|
||||
delete(contextMnu);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue