mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-22 13:24:26 -04:00
Added back to display comments counts on the comments button
This commit is contained in:
parent
587ee69fe5
commit
9ce886cfb6
1 changed files with 7 additions and 11 deletions
|
@ -60,29 +60,25 @@ BoardPostDisplayWidgetBase::BoardPostDisplayWidgetBase(const RsPostedPost& post,
|
||||||
|
|
||||||
void BoardPostDisplayWidgetBase::setCommentsSize(int comNb)
|
void BoardPostDisplayWidgetBase::setCommentsSize(int comNb)
|
||||||
{
|
{
|
||||||
QString sComButText ;
|
QString sComButText = tr("Comment");
|
||||||
|
QString sComButTooltip ;
|
||||||
|
|
||||||
if (comNb == 1)
|
if (comNb == 1)
|
||||||
sComButText = tr("1 comment");
|
sComButText = tr("1 comment");
|
||||||
else if(comNb > 1)
|
else if(comNb > 1)
|
||||||
sComButText = tr("%1 comments").arg(comNb);
|
sComButText = tr("%1 comments").arg(comNb);
|
||||||
else
|
|
||||||
sComButText = tr("No comments yet. Click to add one.");
|
|
||||||
|
|
||||||
commentButton()->setToolTip(sComButText);
|
if (comNb == 0)
|
||||||
|
sComButTooltip = tr("No comments yet. Click to add one.");
|
||||||
|
|
||||||
|
commentButton()->setToolTip(sComButTooltip);
|
||||||
|
commentButton()->setText(sComButText);
|
||||||
|
|
||||||
if(comNb > 0)
|
if(comNb > 0)
|
||||||
commentButton()->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/comments_blue.png"));
|
commentButton()->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/comments_blue.png"));
|
||||||
else
|
else
|
||||||
commentButton()->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/comments.png"));
|
commentButton()->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/comments.png"));
|
||||||
|
|
||||||
// QString sComButText = tr("Comment");
|
|
||||||
// if (comNb == 1)
|
|
||||||
// sComButText = sComButText.append("(1)");
|
|
||||||
// else if(comNb > 1)
|
|
||||||
// sComButText = tr("Comments ").append("(%1)").arg(comNb);
|
|
||||||
//
|
|
||||||
commentButton()->setText(tr("Comments"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPostDisplayWidgetBase::makeDownVote()
|
void BoardPostDisplayWidgetBase::makeDownVote()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue