mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-02 18:44:53 -05:00
Fixed to get work the Copy RS Link for the share action
This commit is contained in:
parent
a866184d6d
commit
35cbe5bacb
@ -186,7 +186,7 @@ void BoardPostDisplayWidgetBase::setup()
|
|||||||
QObject::connect(readButton(), SIGNAL(clicked()), this, SLOT(readToggled()));
|
QObject::connect(readButton(), SIGNAL(clicked()), this, SLOT(readToggled()));
|
||||||
|
|
||||||
QAction *CopyLinkAction = new QAction(QIcon(""),tr("Copy RetroShare Link"), this);
|
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);
|
QAction *showInPeopleAct = new QAction(QIcon(), tr("Show author in people tab"), this);
|
||||||
connect(showInPeopleAct, SIGNAL(triggered()), this, SLOT(showAuthorInPeople()));
|
connect(showInPeopleAct, SIGNAL(triggered()), this, SLOT(showAuthorInPeople()));
|
||||||
@ -311,6 +311,11 @@ void BoardPostDisplayWidgetBase::handleShareButtonClicked()
|
|||||||
{
|
{
|
||||||
emit shareButtonClicked();
|
emit shareButtonClicked();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BoardPostDisplayWidgetBase::handleCopyLinkClicked()
|
||||||
|
{
|
||||||
|
emit copylinkClicked();
|
||||||
|
}
|
||||||
//===================================================================================================================================
|
//===================================================================================================================================
|
||||||
//== class BoardPostDisplayWidget ==
|
//== class BoardPostDisplayWidget ==
|
||||||
//===================================================================================================================================
|
//===================================================================================================================================
|
||||||
|
@ -90,6 +90,8 @@ protected slots:
|
|||||||
void makeDownVote() ;
|
void makeDownVote() ;
|
||||||
void setCommentsSize(int comNb) ;
|
void setCommentsSize(int comNb) ;
|
||||||
void handleShareButtonClicked() ;
|
void handleShareButtonClicked() ;
|
||||||
|
void handleCopyLinkClicked() ;
|
||||||
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void changeReadStatusRequested(const RsGxsMessageId&,bool);
|
void changeReadStatusRequested(const RsGxsMessageId&,bool);
|
||||||
@ -98,6 +100,7 @@ signals:
|
|||||||
void commentsRequested(const RsGxsMessageId&,bool);
|
void commentsRequested(const RsGxsMessageId&,bool);
|
||||||
void thumbnailOpenned();
|
void thumbnailOpenned();
|
||||||
void shareButtonClicked();
|
void shareButtonClicked();
|
||||||
|
void copylinkClicked();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
RsPostedPost mPost;
|
RsPostedPost mPost;
|
||||||
|
@ -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(expand(RsGxsMessageId,bool)),this,SLOT(markCurrentPostAsRead()));
|
||||||
QObject::connect(w,SIGNAL(commentsRequested(const RsGxsMessageId&,bool)),mPostListWidget,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(shareButtonClicked()),mPostListWidget,SLOT(markCurrentPostAsRead()));
|
||||||
|
QObject::connect(w,SIGNAL(copylinkClicked()),mPostListWidget,SLOT(copyMessageLink()));
|
||||||
|
|
||||||
w->setFixedSize(option.rect.size());
|
w->setFixedSize(option.rect.size());
|
||||||
w->adjustSize();
|
w->adjustSize();
|
||||||
@ -405,6 +406,7 @@ void PostedListWidgetWithModel::copyMessageLink()
|
|||||||
QList<RetroShareLink> urls;
|
QList<RetroShareLink> urls;
|
||||||
urls.push_back(link);
|
urls.push_back(link);
|
||||||
RSLinkClipboard::copyLinks(urls);
|
RSLinkClipboard::copyLinks(urls);
|
||||||
|
QMessageBox::information(NULL,tr("information"),tr("The Retrohare link was copied to your clipboard.")) ;
|
||||||
}
|
}
|
||||||
catch(std::exception& e)
|
catch(std::exception& e)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user