diff --git a/configuration/ui/settings_general.ui b/configuration/ui/settings_general.ui
--- a/configuration/ui/settings_general.ui
+++ b/configuration/ui/settings_general.ui
@@ -37,6 +37,13 @@
+ -
+
+
+ Hide feeds with no unread articles
+
+
+
-
diff --git a/interfaces/akregator.kcfg b/interfaces/akregator.kcfg
--- a/interfaces/akregator.kcfg
+++ b/interfaces/akregator.kcfg
@@ -5,6 +5,11 @@
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
+
+
+ Hides feeds with no unread articles
+ false
+
Show Quick Filter Bar
@@ -87,7 +92,7 @@
Delete expired articles
-
+
Do not save any articles
@@ -164,17 +169,17 @@
Always show the tab bar, even when only one tab is open
- false
+ false
Show close buttons on tabs instead of icons
- false
+ false
Open a link which would normally open in a new window (external browser) in a new tab instead
- false
+ false
diff --git a/src/abstractselectioncontroller.h b/src/abstractselectioncontroller.h
--- a/src/abstractselectioncontroller.h
+++ b/src/abstractselectioncontroller.h
@@ -121,6 +121,8 @@
public Q_SLOTS:
+ virtual void settingsChanged() = 0;
+
virtual void setFilters(const std::vector > &) = 0;
virtual void forceFilterUpdate() = 0;
diff --git a/src/actions/actionmanagerimpl.h b/src/actions/actionmanagerimpl.h
--- a/src/actions/actionmanagerimpl.h
+++ b/src/actions/actionmanagerimpl.h
@@ -74,6 +74,7 @@
public Q_SLOTS:
void slotNodeSelected(Akregator::TreeNode *node);
+ void slotSettingsChanged();
private Q_SLOTS:
void slotServiceUrlSelected(PimCommon::ShareServiceUrlManager::ServiceType type);
diff --git a/src/actions/actionmanagerimpl.cpp b/src/actions/actionmanagerimpl.cpp
--- a/src/actions/actionmanagerimpl.cpp
+++ b/src/actions/actionmanagerimpl.cpp
@@ -124,6 +124,16 @@
QAction *mQuickSearchAction = nullptr;
};
+void ActionManagerImpl::slotSettingsChanged()
+{
+ QAction *a = action(QStringLiteral("feed_hide_read"));
+ if (!a) {
+ qCCritical(AKREGATOR_LOG) << "Action not found";
+ return;
+ }
+ a->setChecked(Settings::hideReadFeeds());
+}
+
void ActionManagerImpl::slotNodeSelected(TreeNode *node)
{
if (node != 0) {
@@ -520,6 +530,12 @@
action->setText(i18n("Go Down in Tree"));
connect(action, &QAction::triggered, subscriptionListView, &SubscriptionListView::slotItemDown);
coll->setDefaultShortcut(action, QKeySequence(Qt::CTRL + Qt::Key_Down));
+
+ action = coll->addAction(QStringLiteral("feed_hide_read"));
+ action->setCheckable(true);
+ action->setText(i18n("Hide Read Feeds"));
+ action->setChecked(Settings::hideReadFeeds());
+ connect(action, &QAction::triggered, subscriptionListView, &SubscriptionListView::slotSetHideReadFeeds);
}
void ActionManagerImpl::initTabWidget(TabWidget *tabWidget)
diff --git a/src/data/akregator_part.rc b/src/data/akregator_part.rc
--- a/src/data/akregator_part.rc
+++ b/src/data/akregator_part.rc
@@ -1,5 +1,5 @@
-
+