mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-23 22:01:05 -05:00
fixed bugs in setting read status
This commit is contained in:
parent
2561b9bc7e
commit
2a51da2291
@ -94,15 +94,9 @@ void BoardPostDisplayWidgetBase::makeUpVote()
|
|||||||
void BoardPostDisplayWidgetBase::setReadStatus(bool isNew, bool isUnread)
|
void BoardPostDisplayWidgetBase::setReadStatus(bool isNew, bool isUnread)
|
||||||
{
|
{
|
||||||
if (isUnread)
|
if (isUnread)
|
||||||
{
|
|
||||||
readButton()->setChecked(true);
|
|
||||||
readButton()->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/message-state-unread.png"));
|
readButton()->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/message-state-unread.png"));
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
readButton()->setChecked(false);
|
|
||||||
readButton()->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/message-state-read.png"));
|
readButton()->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/message-state-read.png"));
|
||||||
}
|
|
||||||
|
|
||||||
newLabel()->setVisible(isNew);
|
newLabel()->setVisible(isNew);
|
||||||
}
|
}
|
||||||
@ -123,8 +117,10 @@ void BoardPostDisplayWidgetBase::loadComments(bool e)
|
|||||||
emit commentsRequested(mPost.mMeta.mMsgId,e);
|
emit commentsRequested(mPost.mMeta.mMsgId,e);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPostDisplayWidgetBase::readToggled(bool s)
|
void BoardPostDisplayWidgetBase::readToggled()
|
||||||
{
|
{
|
||||||
|
bool s = IS_MSG_UNREAD(mPost.mMeta.mMsgStatus);
|
||||||
|
|
||||||
emit changeReadStatusRequested(mPost.mMeta.mMsgId,s);
|
emit changeReadStatusRequested(mPost.mMeta.mMsgId,s);
|
||||||
}
|
}
|
||||||
void BoardPostDisplayWidgetBase::showAuthorInPeople()
|
void BoardPostDisplayWidgetBase::showAuthorInPeople()
|
||||||
@ -163,7 +159,7 @@ void BoardPostDisplayWidgetBase::setup()
|
|||||||
QObject::connect(commentButton(), SIGNAL(toggled(bool)), this, SLOT(loadComments(bool)));
|
QObject::connect(commentButton(), SIGNAL(toggled(bool)), this, SLOT(loadComments(bool)));
|
||||||
QObject::connect(voteUpButton(), SIGNAL(clicked()), this, SLOT(makeUpVote()));
|
QObject::connect(voteUpButton(), SIGNAL(clicked()), this, SLOT(makeUpVote()));
|
||||||
QObject::connect(voteDownButton(), SIGNAL(clicked()), this, SLOT(makeDownVote()));
|
QObject::connect(voteDownButton(), SIGNAL(clicked()), this, SLOT(makeDownVote()));
|
||||||
QObject::connect(readButton(), SIGNAL(toggled(bool)), this, SLOT(readToggled(bool)));
|
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(copyMessageLink()));
|
||||||
@ -173,6 +169,8 @@ void BoardPostDisplayWidgetBase::setup()
|
|||||||
|
|
||||||
int S = QFontMetricsF(font()).height() ;
|
int S = QFontMetricsF(font()).height() ;
|
||||||
|
|
||||||
|
readButton()->setChecked(false);
|
||||||
|
|
||||||
voteUpButton()->setIconSize(QSize(S*1.5,S*1.5));
|
voteUpButton()->setIconSize(QSize(S*1.5,S*1.5));
|
||||||
voteDownButton()->setIconSize(QSize(S*1.5,S*1.5));
|
voteDownButton()->setIconSize(QSize(S*1.5,S*1.5));
|
||||||
commentButton()->setIconSize(QSize(S*1.5,S*1.5));
|
commentButton()->setIconSize(QSize(S*1.5,S*1.5));
|
||||||
|
@ -82,7 +82,7 @@ protected slots:
|
|||||||
|
|
||||||
void loadComments(bool e);
|
void loadComments(bool e);
|
||||||
void showAuthorInPeople();
|
void showAuthorInPeople();
|
||||||
void readToggled(bool);
|
void readToggled();
|
||||||
void setReadStatus(bool isNew, bool isUnread) ;
|
void setReadStatus(bool isNew, bool isUnread) ;
|
||||||
void makeUpVote() ;
|
void makeUpVote() ;
|
||||||
void makeDownVote() ;
|
void makeDownVote() ;
|
||||||
|
@ -298,7 +298,7 @@
|
|||||||
<normaloff>:/images/message-state-unread.png</normaloff>:/images/message-state-unread.png</iconset>
|
<normaloff>:/images/message-state-unread.png</normaloff>:/images/message-state-unread.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
|
@ -330,7 +330,7 @@
|
|||||||
<normaloff>:/images/message-state-unread.png</normaloff>:/images/message-state-unread.png</iconset>
|
<normaloff>:/images/message-state-unread.png</normaloff>:/images/message-state-unread.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
|
Loading…
Reference in New Issue
Block a user