mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-18 10:02:41 -05:00
Merge pull request #2716 from csoler/v0.6-BugFixing_28
fixed right-click menu on board posts
This commit is contained in:
commit
7d70ecdd65
5 changed files with 59 additions and 115 deletions
|
|
@ -43,6 +43,7 @@
|
|||
|
||||
#define LINK_IMAGE ":/images/thumb-link.png"
|
||||
|
||||
|
||||
// #ifdef DEBUG_BOARDPOSTDISPLAYWIDGET 1
|
||||
|
||||
/** Constructor */
|
||||
|
|
@ -58,6 +59,7 @@ BoardPostDisplayWidgetBase::BoardPostDisplayWidgetBase(const RsPostedPost& post,
|
|||
{
|
||||
}
|
||||
|
||||
|
||||
void BoardPostDisplayWidgetBase::setCommentsSize(int comNb)
|
||||
{
|
||||
QString sComButText = tr("Comment");
|
||||
|
|
@ -168,6 +170,7 @@ void BoardPostDisplayWidgetBase::baseSetup()
|
|||
|
||||
readButton()->setChecked(false);
|
||||
|
||||
#ifdef TO_REMOVE
|
||||
QMenu *menu = new QMenu();
|
||||
menu->addAction(CopyLinkAction);
|
||||
menu->addSeparator();
|
||||
|
|
@ -175,6 +178,7 @@ void BoardPostDisplayWidgetBase::baseSetup()
|
|||
shareButton()->setPopupMode(QToolButton::InstantPopup);
|
||||
|
||||
connect(menu,SIGNAL(aboutToShow()),this,SLOT(handleShareButtonClicked()));
|
||||
#endif
|
||||
|
||||
RsReputationLevel overall_reputation = rsReputations->overallReputationLevel(mPost.mMeta.mAuthorId);
|
||||
bool redacted = (overall_reputation == RsReputationLevel::LOCALLY_NEGATIVE);
|
||||
|
|
@ -182,7 +186,9 @@ void BoardPostDisplayWidgetBase::baseSetup()
|
|||
if(redacted)
|
||||
{
|
||||
commentButton()->setDisabled(true);
|
||||
#ifdef TO_REMOVE
|
||||
shareButton()->setDisabled(true);
|
||||
#endif
|
||||
voteUpButton()->setDisabled(true);
|
||||
voteDownButton()->setDisabled(true);
|
||||
fromLabel()->setId(mPost.mMeta.mAuthorId);
|
||||
|
|
@ -275,6 +281,7 @@ void BoardPostDisplayWidgetBase::baseSetup()
|
|||
emit sizeChanged(this);
|
||||
#endif
|
||||
}
|
||||
#ifdef TO_REMOVE
|
||||
void BoardPostDisplayWidgetBase::handleShareButtonClicked()
|
||||
{
|
||||
emit shareButtonClicked();
|
||||
|
|
@ -284,6 +291,8 @@ void BoardPostDisplayWidgetBase::handleCopyLinkClicked()
|
|||
{
|
||||
emit copylinkClicked();
|
||||
}
|
||||
#endif
|
||||
|
||||
//===================================================================================================================================
|
||||
//== class BoardPostDisplayWidget ==
|
||||
//===================================================================================================================================
|
||||
|
|
@ -292,6 +301,7 @@ BoardPostDisplayWidget_compact::BoardPostDisplayWidget_compact(const RsPostedPos
|
|||
: BoardPostDisplayWidgetBase(post,display_flags,parent), ui(new Ui::BoardPostDisplayWidget_compact())
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->shareButton->hide();
|
||||
BoardPostDisplayWidget_compact::setup();
|
||||
}
|
||||
|
||||
|
|
@ -403,7 +413,7 @@ QLabel *BoardPostDisplayWidget_compact::dateLabel() { return ui->da
|
|||
ElidedLabel *BoardPostDisplayWidget_compact::titleLabel() { return ui->titleLabel; }
|
||||
QLabel *BoardPostDisplayWidget_compact::scoreLabel() { return ui->scoreLabel; }
|
||||
QLabel *BoardPostDisplayWidget_compact::notes() { return ui->notes; }
|
||||
QToolButton *BoardPostDisplayWidget_compact::shareButton() { return ui->shareButton; }
|
||||
//QToolButton *BoardPostDisplayWidget_compact::shareButton() { return ui->shareButton; }
|
||||
QLabel *BoardPostDisplayWidget_compact::pictureLabel() { return ui->pictureLabel; }
|
||||
QFrame *BoardPostDisplayWidget_compact::feedFrame() { return ui->feedFrame; }
|
||||
|
||||
|
|
@ -415,7 +425,8 @@ BoardPostDisplayWidget_card::BoardPostDisplayWidget_card(const RsPostedPost& pos
|
|||
: BoardPostDisplayWidgetBase(post,display_flags,parent), ui(new Ui::BoardPostDisplayWidget_card())
|
||||
{
|
||||
ui->setupUi(this);
|
||||
BoardPostDisplayWidget_card::setup();
|
||||
ui->shareButton->hide();
|
||||
BoardPostDisplayWidget_card::setup();
|
||||
}
|
||||
|
||||
BoardPostDisplayWidget_card::~BoardPostDisplayWidget_card()
|
||||
|
|
@ -472,7 +483,7 @@ QLabel *BoardPostDisplayWidget_card::dateLabel() { return ui->dateL
|
|||
ElidedLabel *BoardPostDisplayWidget_card::titleLabel() { return ui->titleLabel; }
|
||||
QLabel *BoardPostDisplayWidget_card::scoreLabel() { return ui->scoreLabel; }
|
||||
QLabel *BoardPostDisplayWidget_card::notes() { return ui->notes; }
|
||||
QToolButton *BoardPostDisplayWidget_card::shareButton() { return ui->shareButton; }
|
||||
//QToolButton *BoardPostDisplayWidget_card::shareButton() { return ui->shareButton; }
|
||||
QLabel *BoardPostDisplayWidget_card::pictureLabel() { return ui->pictureLabel; }
|
||||
QFrame *BoardPostDisplayWidget_card::feedFrame() { return ui->feedFrame; }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue