Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Akregator
Commits
1698aa23
Commit
1698aa23
authored
Mar 21, 2021
by
Luigi Baldoni
Committed by
Laurent Montel
Mar 30, 2021
Browse files
Fix bug 354983 - allow to lock feeds in place
BUG: 354983
(thanks @Jari Kuittinen)
parent
e9e32213
Changes
6
Hide whitespace changes
Inline
Side-by-side
configuration/ui/settings_general.ui
View file @
1698aa23
...
...
@@ -51,6 +51,13 @@
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"kcfg_LockFeedsInPlace"
>
<property
name=
"text"
>
<string>
Lock feeds in place
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"kcfg_AutoExpandFolders"
>
<property
name=
"text"
>
...
...
interfaces/akregator.kcfg
View file @
1698aa23
...
...
@@ -10,6 +10,11 @@
<whatsthis>
Hides feeds with no unread articles
</whatsthis>
<default>
false
</default>
</entry>
<entry
key=
"Lock Feeds In Place"
type=
"Bool"
>
<label>
Prevent feeds from being moved in the list
</label>
<whatsthis>
Locks feeds where they are
</whatsthis>
<default>
false
</default>
</entry>
<entry
key=
"Auto Expand Folders"
type=
"Bool"
>
<label>
Auto-Expand folders with unread articles
</label>
<whatsthis>
Auto-expand folders containing unread articles
</whatsthis>
...
...
src/actions/actionmanagerimpl.cpp
View file @
1698aa23
...
...
@@ -117,6 +117,13 @@ void ActionManagerImpl::slotSettingsChanged()
}
a
->
setChecked
(
Settings
::
hideReadFeeds
());
a
=
action
(
QStringLiteral
(
"feed_lock_in_place"
));
if
(
!
a
)
{
qCCritical
(
AKREGATOR_LOG
)
<<
"Action not found"
;
return
;
}
a
->
setChecked
(
Settings
::
lockFeedsInPlace
());
a
=
action
(
QStringLiteral
(
"auto_expand_folders"
));
if
(
!
a
)
{
qCCritical
(
AKREGATOR_LOG
)
<<
"Action not found"
;
...
...
@@ -529,6 +536,12 @@ void ActionManagerImpl::initSubscriptionListView(SubscriptionListView *subscript
action
->
setChecked
(
Settings
::
hideReadFeeds
());
connect
(
action
,
&
QAction
::
triggered
,
subscriptionListView
,
&
SubscriptionListView
::
slotSetHideReadFeeds
);
action
=
coll
->
addAction
(
QStringLiteral
(
"feed_lock_in_place"
));
action
->
setCheckable
(
true
);
action
->
setText
(
i18n
(
"Lock Feeds In Place"
));
action
->
setChecked
(
Settings
::
lockFeedsInPlace
());
connect
(
action
,
&
QAction
::
triggered
,
subscriptionListView
,
&
SubscriptionListView
::
slotSetLockFeedsInPlace
);
action
=
coll
->
addAction
(
QStringLiteral
(
"auto_expand_folders"
));
action
->
setCheckable
(
true
);
action
->
setText
(
i18n
(
"Auto-expand folders with unread articles"
));
...
...
src/data/akregator_part.rc
View file @
1698aa23
...
...
@@ -26,6 +26,7 @@
<Action
name=
"zoom_menu"
/>
<Separator/>
<Action
name=
"feed_hide_read"
/>
<Action
name=
"feed_lock_in_place"
/>
<Action
name=
"auto_expand_folders"
/>
</Menu>
...
...
src/subscription/subscriptionlistview.cpp
View file @
1698aa23
...
...
@@ -393,6 +393,17 @@ void SubscriptionListView::slotSetHideReadFeeds(bool setting)
filter
->
setDoFilter
(
setting
);
}
void
SubscriptionListView
::
slotSetLockFeedsInPlace
(
bool
setting
)
{
if
(
!
model
())
{
return
;
}
setDragDropMode
(
setting
?
QAbstractItemView
::
NoDragDrop
:
QAbstractItemView
::
InternalMove
);
Settings
::
setLockFeedsInPlace
(
setting
);
}
void
Akregator
::
SubscriptionListView
::
slotSetAutoExpandFolders
(
bool
setting
)
{
Settings
::
setAutoExpandFolders
(
setting
);
...
...
src/subscription/subscriptionlistview.h
View file @
1698aa23
...
...
@@ -53,6 +53,7 @@ public Q_SLOTS:
void
slotItemDown
();
void
slotSetHideReadFeeds
(
bool
setting
);
void
slotSetLockFeedsInPlace
(
bool
setting
);
void
slotSetAutoExpandFolders
(
bool
setting
);
Q_SIGNALS:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment