mirror of
https://github.com/RetroShare/RetroShare.git
synced 2026-09-12 19:50:17 +05:00
Merge pull request #3284 from jolavillette/fix/feedreader-mark-all-unread
FeedReader: add "Mark all as unread" alongside "Mark all as read"
This commit is contained in:
commit
2bf991418d
@ -364,6 +364,9 @@ void FeedReaderMessageWidget::msgTreeCustomPopupMenu(QPoint /*point*/)
|
||||
action = contextMnu.addAction(QIcon(""), tr("Mark all as read"), this, SLOT(markAllAsReadMsg()));
|
||||
action->setEnabled(mFeedId);
|
||||
|
||||
action = contextMnu.addAction(QIcon(""), tr("Mark all as unread"), this, SLOT(markAllAsUnreadMsg()));
|
||||
action->setEnabled(mFeedId);
|
||||
|
||||
contextMnu.addSeparator();
|
||||
|
||||
action = contextMnu.addAction(QIcon(""), tr("Copy link"), this, SLOT(copySelectedLinksMsg()));
|
||||
@ -820,6 +823,16 @@ void FeedReaderMessageWidget::markAsUnreadMsg()
|
||||
}
|
||||
|
||||
void FeedReaderMessageWidget::markAllAsReadMsg()
|
||||
{
|
||||
setAllMsgAsReadUnread(true);
|
||||
}
|
||||
|
||||
void FeedReaderMessageWidget::markAllAsUnreadMsg()
|
||||
{
|
||||
setAllMsgAsReadUnread(false);
|
||||
}
|
||||
|
||||
void FeedReaderMessageWidget::setAllMsgAsReadUnread(bool read)
|
||||
{
|
||||
QList<QTreeWidgetItem*> items;
|
||||
|
||||
@ -831,7 +844,7 @@ void FeedReaderMessageWidget::markAllAsReadMsg()
|
||||
}
|
||||
++it;
|
||||
}
|
||||
setMsgAsReadUnread(items, true);
|
||||
setMsgAsReadUnread(items, read);
|
||||
}
|
||||
|
||||
void FeedReaderMessageWidget::copySelectedLinksMsg()
|
||||
|
||||
@ -68,6 +68,7 @@ private slots:
|
||||
void markAsReadMsg();
|
||||
void markAsUnreadMsg();
|
||||
void markAllAsReadMsg();
|
||||
void markAllAsUnreadMsg();
|
||||
void copySelectedLinksMsg();
|
||||
void removeMsg();
|
||||
void processFeed();
|
||||
@ -91,6 +92,7 @@ private:
|
||||
void calculateMsgIconsAndFonts(QTreeWidgetItem *item);
|
||||
void updateMsgItem(QTreeWidgetItem *item, FeedMsgInfo &info);
|
||||
void setMsgAsReadUnread(QList<QTreeWidgetItem*> &rows, bool read);
|
||||
void setAllMsgAsReadUnread(bool read);
|
||||
void filterItem(QTreeWidgetItem *item, const QString &text, int filterColumn);
|
||||
void filterItem(QTreeWidgetItem *item);
|
||||
void toggleMsgText_internal();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user