Patch from Kevin Tardif

Authored by mlaurent on Oct 6 2017, 4:57 AM.

Description

Patch from Kevin Tardif

Added Hide Read Feed option
This patch adds a new option, to hide feeds with zero unread count from the feed list. You can access the setting via either the View menubar item or via the General configuration panel, it defaults to being turned off. This is useful if you have many feeds, as it makes the feed list less crowded by hiding those with no new items.

subscriptionlistmodel:

filter models are present in articlelistview, but controller only includes listmodel.h, so I put FilterUnreadProxyModel here
added FilterUnreadProxyModel, a QSortFilerProxyModel subclass to filter out feeds with zero unread count
uint nodeIdForIndex(const QModelIndex&) is now a file-specific method
changed FolderExpansionHandler::m_model to be of type QAbstractItemModel* (since it no longer needs SubscriptionListModel::nodeIdForIndex)

selectioncontroller:

hooked filter's selectionmodel's selectionChanged signal in SelectionController::setFeedSelector to the FilterUnreadProxyModel instance
m_subscriptionModel is now a FilterUnreadProxyModel*
added SelectionController::settingsChanged slot
changed SelectionController::setFeedList to set the proxy's source
model

actionmanagerimpl:

added slotSettingsChanged slot for receiving MainWidget::signalSettingsChange signal and updating action state
added a KAction to ActionManagerImpl:initSubscriptionListView, connected to SubscriptionListView::slotSetHideReadFeeds

subscriptionlistview:

added a public slot to connect the added action to (slotSetHideReadFeeds)

mainwidget:

hooked m_part's signalSettingsChanged() to m_selectionController::settingsChanged, m_actionManager::slotSettingsChanged

interfaces/akregator.kcfg:

added View/HideReadFeeds entry

akregator_part.rc:

add a separator and an action to <Menu name="view"> (name=feed_hide_read)

settings_general.ui:

add kcfg_HideReadFeeds field under General->Global

Differential Revision: https://phabricator.kde.org/D8091

Details

Committed
mlaurentOct 6 2017, 4:57 AM
Differential Revision
D8091: Added Hide Read Feed option
Parents
R201:a9a392c68894: Port to new connect api
Branches
Unknown
Tags
Unknown