diff --git a/CMakeLists.txt b/CMakeLists.txt index 3df746e26..94e4855e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -158,6 +158,12 @@ if(NOT OS2) list(APPEND QT_COMPONENTS Multimedia) endif() +if(MINGW AND NO_LITE) + message(WARNING "MinGW can only compile lite version of RSS Guard. Switching to it.") + set(NO_LITE OFF) +endif() + + if(ENABLE_MEDIAPLAYER_QTMULTIMEDIA AND ENABLE_MEDIAPLAYER_LIBMPV) message(FATAL_ERROR "You can only enable 1 media player backend.") endif() diff --git a/src/librssguard/core/messagesproxymodel.cpp b/src/librssguard/core/messagesproxymodel.cpp index 78ffacab1..d72cc52cf 100644 --- a/src/librssguard/core/messagesproxymodel.cpp +++ b/src/librssguard/core/messagesproxymodel.cpp @@ -36,6 +36,10 @@ void MessagesProxyModel::initializeFilters() { return !m_sourceModel->data(msg_row_index, MSG_DB_READ_INDEX, Qt::ItemDataRole::EditRole).toBool(); }; + m_filters[MessageListFilter::ShowRead] = [this](int msg_row_index) { + return m_sourceModel->data(msg_row_index, MSG_DB_READ_INDEX, Qt::ItemDataRole::EditRole).toBool(); + }; + m_filters[MessageListFilter::ShowImportant] = [this](int msg_row_index) { return m_sourceModel->data(msg_row_index, MSG_DB_IMPORTANT_INDEX, Qt::ItemDataRole::EditRole).toBool(); }; @@ -235,8 +239,8 @@ int MessagesProxyModel::additionalArticleId() const { return m_additionalArticleId; } -void MessagesProxyModel::setAdditionalArticleId(int newAdditionalArticleId) { - m_additionalArticleId = newAdditionalArticleId; +void MessagesProxyModel::setAdditionalArticleId(int additional_article_id) { + m_additionalArticleId = additional_article_id; } void MessagesProxyModel::setMessageListFilter(MessageListFilter filter) { diff --git a/src/librssguard/core/messagesproxymodel.h b/src/librssguard/core/messagesproxymodel.h index 9349ee622..56d340888 100644 --- a/src/librssguard/core/messagesproxymodel.h +++ b/src/librssguard/core/messagesproxymodel.h @@ -25,7 +25,8 @@ class MessagesProxyModel : public QSortFilterProxyModel { ShowThisWeek = 128, ShowLastWeek = 256, ShowOnlyWithAttachments = 512, - ShowOnlyWithScore = 1024 + ShowOnlyWithScore = 1024, + ShowRead = 2048 }; explicit MessagesProxyModel(MessagesModel* source_model, QObject* parent = nullptr); @@ -53,7 +54,7 @@ class MessagesProxyModel : public QSortFilterProxyModel { virtual void sort(int column, Qt::SortOrder order = Qt::AscendingOrder); int additionalArticleId() const; - void setAdditionalArticleId(int newAdditionalArticleId); + void setAdditionalArticleId(int additional_article_id); private: void initializeFilters(); diff --git a/src/librssguard/gui/toolbars/messagestoolbar.cpp b/src/librssguard/gui/toolbars/messagestoolbar.cpp index 0abc9337c..f20907058 100644 --- a/src/librssguard/gui/toolbars/messagestoolbar.cpp +++ b/src/librssguard/gui/toolbars/messagestoolbar.cpp @@ -277,6 +277,11 @@ void MessagesToolBar::initializeHighlighter() { tr("Show unread articles"), QVariant::fromValue(MessagesProxyModel::MessageListFilter::ShowUnread), QSL("show_unread")); + addActionToMenu(m_menuMessageFilter, + qApp->icons()->fromTheme(QSL("mail-mark-read")), + tr("Show read articles"), + QVariant::fromValue(MessagesProxyModel::MessageListFilter::ShowRead), + QSL("show_read")); addActionToMenu(m_menuMessageFilter, qApp->icons()->fromTheme(QSL("mail-mark-important")), tr("Show important articles"),