diff --git a/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.cpp b/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.cpp index 514ae5fcf..74326d8f4 100644 --- a/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.cpp +++ b/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.cpp @@ -186,7 +186,7 @@ void BoardPostDisplayWidgetBase::setup() QObject::connect(readButton(), SIGNAL(clicked()), this, SLOT(readToggled())); QAction *CopyLinkAction = new QAction(QIcon(""),tr("Copy RetroShare Link"), this); - connect(CopyLinkAction, SIGNAL(triggered()), this, SLOT(copyMessageLink())); + connect(CopyLinkAction, SIGNAL(triggered()), this, SLOT(handleCopyLinkClicked())); QAction *showInPeopleAct = new QAction(QIcon(), tr("Show author in people tab"), this); connect(showInPeopleAct, SIGNAL(triggered()), this, SLOT(showAuthorInPeople())); @@ -311,6 +311,11 @@ void BoardPostDisplayWidgetBase::handleShareButtonClicked() { emit shareButtonClicked(); } + +void BoardPostDisplayWidgetBase::handleCopyLinkClicked() +{ + emit copylinkClicked(); +} //=================================================================================================================================== //== class BoardPostDisplayWidget == //=================================================================================================================================== diff --git a/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.h b/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.h index 03db04970..2016ff678 100644 --- a/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.h +++ b/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.h @@ -90,6 +90,8 @@ protected slots: void makeDownVote() ; void setCommentsSize(int comNb) ; void handleShareButtonClicked() ; + void handleCopyLinkClicked() ; + signals: void changeReadStatusRequested(const RsGxsMessageId&,bool); @@ -98,6 +100,7 @@ signals: void commentsRequested(const RsGxsMessageId&,bool); void thumbnailOpenned(); void shareButtonClicked(); + void copylinkClicked(); protected: RsPostedPost mPost; diff --git a/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp b/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp index d0cb983a7..387b271eb 100644 --- a/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp +++ b/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp @@ -205,6 +205,7 @@ QWidget *PostedPostDelegate::createEditor(QWidget *parent, const QStyleOptionVie QObject::connect(w,SIGNAL(expand(RsGxsMessageId,bool)),this,SLOT(markCurrentPostAsRead())); QObject::connect(w,SIGNAL(commentsRequested(const RsGxsMessageId&,bool)),mPostListWidget,SLOT(markCurrentPostAsRead())); QObject::connect(w,SIGNAL(shareButtonClicked()),mPostListWidget,SLOT(markCurrentPostAsRead())); + QObject::connect(w,SIGNAL(copylinkClicked()),mPostListWidget,SLOT(copyMessageLink())); w->setFixedSize(option.rect.size()); w->adjustSize(); @@ -405,6 +406,7 @@ void PostedListWidgetWithModel::copyMessageLink() QList urls; urls.push_back(link); RSLinkClipboard::copyLinks(urls); + QMessageBox::information(NULL,tr("information"),tr("The Retrohare link was copied to your clipboard.")) ; } catch(std::exception& e) {