mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-02-02 10:27:15 +01:00
fixes #1017
This commit is contained in:
parent
b974f91987
commit
cd24bcd649
@ -48,8 +48,8 @@ $zlib_version = "1.3.1"
|
||||
$zlib_link = "https://github.com/madler/zlib/archive/refs/tags/v$zlib_version.zip"
|
||||
$zlib_output = "zlib.zip"
|
||||
|
||||
$libmpv_date = "2024-04-14"
|
||||
$libmpv_commit = "6a8b130"
|
||||
$libmpv_date = "2024-04-19"
|
||||
$libmpv_commit = "1a49545"
|
||||
$libmpv_version = "{0}-git-{1}"-f $libmpv_date.Replace("-", ""), $libmpv_commit
|
||||
$libmpv_link = "https://github.com/zhongfly/mpv-winbuild/releases/download/$libmpv_date-$libmpv_commit/mpv-dev-x86_64-$libmpv_version.7z"
|
||||
$libmpv_output = "mpv.zip"
|
||||
|
@ -6,6 +6,7 @@ OK, dear users. Over recent releases, many features were added and as you can se
|
||||
Sole focus will be on fixing bugs and polish existing features and clean codebase.
|
||||
|
||||
Added:
|
||||
* Article now can be marked (upon selection) as read with delay or only manually. (#1017)
|
||||
* All RSS Guard plugins/services are now placed in their own library (DLL/SO/DYLIB) files and are loaded by main RSS Guard library dynamically. This means that unused services can now be removed from RSS Guard installation if not used by the user. Also it allows for a cleaner and slimmer common codebase. Refactoring of main RSS Guard library was also done and it is now more usable as regular dynamic-link library. I expect some regressions as this was HUGE change. Also, this change allows new potential interested people in writing new plugins easier as they now can just copy one of existing plugins and tweak for new service.
|
||||
* Application (Qt) style and icon theme now can be properly set to respect system style/icons and this setting is dynamic, meaning if you change system theme and restart RSS Guard, new theme is honored. (#1352)
|
||||
* Button to copy system/app information to "About..." dialog. (#1318)
|
||||
|
@ -159,9 +159,11 @@ void MessagesModel::repopulate() {
|
||||
<< QUOTE_W_SPACE_DOT(selectStatement());
|
||||
}
|
||||
|
||||
bool MessagesModel::setData(const QModelIndex& index, const QVariant& value, int role) {
|
||||
bool MessagesModel::setData(const QModelIndex& idx, const QVariant& value, int role) {
|
||||
Q_UNUSED(role)
|
||||
m_cache->setData(index, value);
|
||||
m_cache->setData(idx, value);
|
||||
|
||||
emit dataChanged(index(idx.row(), 0), index(idx.row(), MSG_DB_LABELS_IDS));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ class MessagesModel : public QSqlQueryModel, public MessagesModelSqlLayer {
|
||||
void repopulate();
|
||||
|
||||
// Model implementation.
|
||||
bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole);
|
||||
bool setData(const QModelIndex& idx, const QVariant& value, int role = Qt::EditRole);
|
||||
QVariant data(const QModelIndex& idx, int role = Qt::DisplayRole) const;
|
||||
QVariant data(int row, int column, int role = Qt::DisplayRole) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
|
||||
|
@ -62,7 +62,7 @@ LibMpvBackend::LibMpvBackend(Application* app, QWidget* parent)
|
||||
mpv_set_option_string(m_mpvHandle, "no-resume-playback", "yes");
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
// mpv_set_option_string(m_mpvHandle, "terminal", "yes");
|
||||
mpv_set_option_string(m_mpvHandle, "terminal", "yes");
|
||||
#endif
|
||||
|
||||
if (!m_customConfigFolder.isEmpty()) {
|
||||
|
@ -40,12 +40,13 @@ MessagesView::MessagesView(QWidget* parent)
|
||||
createConnections();
|
||||
setModel(m_proxyModel);
|
||||
setupAppearance();
|
||||
setupArticleMarkingPolicy();
|
||||
header()->setContextMenuPolicy(Qt::ContextMenuPolicy::CustomContextMenu);
|
||||
connect(header(), &QHeaderView::customContextMenuRequested, this, [=](QPoint point) {
|
||||
TreeViewColumnsMenu mm(header());
|
||||
mm.exec(header()->mapToGlobal(point));
|
||||
});
|
||||
|
||||
connect(&m_delayedArticleMarker, &QTimer::timeout, this, &MessagesView::markSelectedMessagesReadDelayed);
|
||||
reloadFontSettings();
|
||||
}
|
||||
|
||||
@ -57,6 +58,16 @@ void MessagesView::reloadFontSettings() {
|
||||
m_sourceModel->setupFonts();
|
||||
}
|
||||
|
||||
void MessagesView::setupArticleMarkingPolicy() {
|
||||
m_articleMarkingPolicy =
|
||||
ArticleMarkingPolicy(qApp->settings()->value(GROUP(Messages), SETTING(Messages::ArticleMarkOnSelection)).toInt());
|
||||
m_articleMarkingDelay =
|
||||
qApp->settings()->value(GROUP(Messages), SETTING(Messages::ArticleMarkOnSelectionDelay)).toInt();
|
||||
|
||||
m_delayedArticleMarker.setSingleShot(true);
|
||||
m_delayedArticleMarker.setInterval(m_articleMarkingDelay);
|
||||
}
|
||||
|
||||
QByteArray MessagesView::saveHeaderState() const {
|
||||
QJsonObject obj;
|
||||
|
||||
@ -504,11 +515,25 @@ void MessagesView::selectionChanged(const QItemSelection& selected, const QItemS
|
||||
// Set this message as read only if current item
|
||||
// wasn't changed by "mark selected messages unread" action.
|
||||
if (!m_processingRightMouseButton) {
|
||||
m_sourceModel->setMessageRead(mapped_current_index.row(), RootItem::ReadStatus::Read);
|
||||
message.m_isRead = true;
|
||||
}
|
||||
if (!message.m_isRead) {
|
||||
if (m_articleMarkingPolicy == ArticleMarkingPolicy::MarkImmediately) {
|
||||
qDebugNN << LOGSEC_GUI << "Marking article as read immediately.";
|
||||
|
||||
emit currentMessageChanged(message, m_sourceModel->loadedItem());
|
||||
m_sourceModel->setMessageRead(mapped_current_index.row(), RootItem::ReadStatus::Read);
|
||||
message.m_isRead = true;
|
||||
}
|
||||
else if (m_articleMarkingPolicy == ArticleMarkingPolicy::MarkWithDelay) {
|
||||
qDebugNN << LOGSEC_GUI << "(Re)Starting timer to mark article as read with a delay.";
|
||||
m_delayedArticleIndex = current_index;
|
||||
m_delayedArticleMarker.start();
|
||||
}
|
||||
else {
|
||||
// NOTE: Article can only be marked as read manually, so just change.
|
||||
}
|
||||
}
|
||||
|
||||
emit currentMessageChanged(message, m_sourceModel->loadedItem());
|
||||
}
|
||||
}
|
||||
else {
|
||||
emit currentMessageRemoved(m_sourceModel->loadedItem());
|
||||
@ -526,7 +551,25 @@ void MessagesView::selectionChanged(const QItemSelection& selected, const QItemS
|
||||
QTreeView::selectionChanged(selected, deselected);
|
||||
}
|
||||
|
||||
void MessagesView::markSelectedMessagesReadDelayed() {
|
||||
qDebugNN << LOGSEC_GUI << "Delay has passed! Marking article as read NOW.";
|
||||
const QModelIndexList selected_rows = selectionModel()->selectedRows();
|
||||
const QModelIndex current_index = m_delayedArticleIndex;
|
||||
|
||||
if (selected_rows.size() == 1 && current_index.isValid() && !m_processingRightMouseButton &&
|
||||
m_articleMarkingPolicy == ArticleMarkingPolicy::MarkWithDelay) {
|
||||
const QModelIndex mapped_current_index = m_proxyModel->mapToSource(current_index);
|
||||
Message message = m_sourceModel->messageAt(m_proxyModel->mapToSource(current_index).row());
|
||||
|
||||
m_sourceModel->setMessageRead(mapped_current_index.row(), RootItem::ReadStatus::Read);
|
||||
message.m_isRead = true;
|
||||
emit currentMessageChanged(message, m_sourceModel->loadedItem());
|
||||
}
|
||||
}
|
||||
|
||||
void MessagesView::loadItem(RootItem* item) {
|
||||
m_delayedArticleMarker.stop();
|
||||
|
||||
const int col = header()->sortIndicatorSection();
|
||||
const Qt::SortOrder ord = header()->sortIndicatorOrder();
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "services/abstract/rootitem.h"
|
||||
|
||||
#include <QHeaderView>
|
||||
#include <QTimer>
|
||||
|
||||
class MessagesProxyModel;
|
||||
|
||||
@ -17,6 +18,17 @@ class MessagesView : public BaseTreeView {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum class ArticleMarkingPolicy {
|
||||
// Article is marked as read right when selected.
|
||||
MarkImmediately = 0,
|
||||
|
||||
// Article is marked as read with some configured delay.
|
||||
MarkWithDelay = 1,
|
||||
|
||||
// Article is never marked as read on selection.
|
||||
MarkOnlyManually = 2
|
||||
};
|
||||
|
||||
explicit MessagesView(QWidget* parent = nullptr);
|
||||
virtual ~MessagesView();
|
||||
|
||||
@ -24,6 +36,7 @@ class MessagesView : public BaseTreeView {
|
||||
MessagesModel* sourceModel() const;
|
||||
|
||||
void reloadFontSettings();
|
||||
void setupArticleMarkingPolicy();
|
||||
|
||||
QByteArray saveHeaderState() const;
|
||||
void restoreHeaderState(const QByteArray& dta);
|
||||
@ -82,6 +95,8 @@ class MessagesView : public BaseTreeView {
|
||||
// Changes resize mode for all columns.
|
||||
void adjustColumns();
|
||||
|
||||
void markSelectedMessagesReadDelayed();
|
||||
|
||||
// Saves current sort state.
|
||||
void onSortIndicatorChanged(int column, Qt::SortOrder order);
|
||||
|
||||
@ -130,6 +145,10 @@ class MessagesView : public BaseTreeView {
|
||||
bool m_columnsAdjusted;
|
||||
bool m_processingAnyMouseButton;
|
||||
bool m_processingRightMouseButton;
|
||||
ArticleMarkingPolicy m_articleMarkingPolicy;
|
||||
int m_articleMarkingDelay;
|
||||
QTimer m_delayedArticleMarker;
|
||||
QModelIndex m_delayedArticleIndex;
|
||||
};
|
||||
|
||||
inline MessagesProxyModel* MessagesView::model() const {
|
||||
|
@ -46,6 +46,18 @@ SettingsFeedsMessages::SettingsFeedsMessages(Settings* settings, QWidget* parent
|
||||
m_ui->m_cmbUnreadIconType->addItem(MessagesModel::descriptionOfUnreadIcon(en), int(en));
|
||||
}
|
||||
|
||||
m_ui->m_cmbArticleMarkingPolicy->addItem(tr("immediately"), int(MessagesView::ArticleMarkingPolicy::MarkImmediately));
|
||||
m_ui->m_cmbArticleMarkingPolicy->addItem(tr("only manually"),
|
||||
int(MessagesView::ArticleMarkingPolicy::MarkOnlyManually));
|
||||
m_ui->m_cmbArticleMarkingPolicy->addItem(tr("with delay"), int(MessagesView::ArticleMarkingPolicy::MarkWithDelay));
|
||||
|
||||
updateArticleMarkingPolicyDelay();
|
||||
|
||||
connect(m_ui->m_cmbArticleMarkingPolicy,
|
||||
&QComboBox::currentIndexChanged,
|
||||
this,
|
||||
&SettingsFeedsMessages::updateArticleMarkingPolicyDelay);
|
||||
|
||||
connect(m_ui->m_cbShowEnclosuresDirectly, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
|
||||
connect(m_ui->m_spinHeightImageAttachments,
|
||||
static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
|
||||
@ -70,6 +82,14 @@ SettingsFeedsMessages::SettingsFeedsMessages(Settings* settings, QWidget* parent
|
||||
}
|
||||
});
|
||||
|
||||
connect(m_ui->m_cmbArticleMarkingPolicy,
|
||||
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this,
|
||||
&SettingsFeedsMessages::dirtifySettings);
|
||||
connect(m_ui->m_spinArticleMarkingPolicy,
|
||||
static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
|
||||
this,
|
||||
&SettingsFeedsMessages::dirtifySettings);
|
||||
connect(m_ui->m_gbFeedListFont, &QGroupBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
|
||||
connect(m_ui->m_gbArticleListFont, &QGroupBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
|
||||
connect(m_ui->m_cbListsRestrictedShortcuts, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
|
||||
@ -261,6 +281,10 @@ void SettingsFeedsMessages::changeFont(QLabel& lbl) {
|
||||
}
|
||||
}
|
||||
|
||||
MessagesView::ArticleMarkingPolicy SettingsFeedsMessages::selectedArticleMarkingPolicy() const {
|
||||
return m_ui->m_cmbArticleMarkingPolicy->currentData().value<MessagesView::ArticleMarkingPolicy>();
|
||||
}
|
||||
|
||||
void SettingsFeedsMessages::loadSettings() {
|
||||
onBeginLoadSettings();
|
||||
|
||||
@ -268,6 +292,14 @@ void SettingsFeedsMessages::loadSettings() {
|
||||
m_ui->m_cbLegacyArticleFormatting->setVisible(false);
|
||||
}
|
||||
|
||||
m_ui->m_cmbArticleMarkingPolicy
|
||||
->setCurrentIndex(m_ui->m_cmbArticleMarkingPolicy->findData(settings()
|
||||
->value(GROUP(Messages),
|
||||
SETTING(Messages::ArticleMarkOnSelection))
|
||||
.toInt()));
|
||||
m_ui->m_spinArticleMarkingPolicy
|
||||
->setValue(settings()->value(GROUP(Messages), SETTING(Messages::ArticleMarkOnSelectionDelay)).toInt());
|
||||
|
||||
m_ui->m_spinRelativeArticleTime
|
||||
->setValue(settings()->value(GROUP(Messages), SETTING(Messages::RelativeTimeForNewerArticles)).toInt());
|
||||
m_ui->m_spinPaddingRowsMessages
|
||||
@ -376,6 +408,16 @@ void SettingsFeedsMessages::loadSettings() {
|
||||
void SettingsFeedsMessages::saveSettings() {
|
||||
onBeginSaveSettings();
|
||||
|
||||
settings()->setValue(GROUP(Messages),
|
||||
Messages::ArticleMarkOnSelection,
|
||||
m_ui->m_cmbArticleMarkingPolicy->currentData().toInt());
|
||||
|
||||
settings()->setValue(GROUP(Messages),
|
||||
Messages::ArticleMarkOnSelectionDelay,
|
||||
m_ui->m_spinArticleMarkingPolicy->value());
|
||||
|
||||
qApp->mainForm()->tabWidget()->feedMessageViewer()->messagesView()->setupArticleMarkingPolicy();
|
||||
|
||||
settings()->setValue(GROUP(Messages),
|
||||
Messages::RelativeTimeForNewerArticles,
|
||||
m_ui->m_spinRelativeArticleTime->value());
|
||||
@ -506,3 +548,8 @@ void SettingsFeedsMessages::updateDateTimeTooltip() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsFeedsMessages::updateArticleMarkingPolicyDelay() {
|
||||
m_ui->m_spinArticleMarkingPolicy->setEnabled(selectedArticleMarkingPolicy() ==
|
||||
MessagesView::ArticleMarkingPolicy::MarkWithDelay);
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
#ifndef SETTINGSFEEDSMESSAGES_H
|
||||
#define SETTINGSFEEDSMESSAGES_H
|
||||
|
||||
#include "gui/messagesview.h"
|
||||
#include "gui/settings/settingspanel.h"
|
||||
|
||||
#include "ui_settingsfeedsmessages.h"
|
||||
@ -21,9 +22,11 @@ class SettingsFeedsMessages : public SettingsPanel {
|
||||
|
||||
private slots:
|
||||
void updateDateTimeTooltip();
|
||||
void updateArticleMarkingPolicyDelay();
|
||||
|
||||
private:
|
||||
void changeFont(QLabel& lbl);
|
||||
MessagesView::ArticleMarkingPolicy selectedArticleMarkingPolicy() const;
|
||||
|
||||
private:
|
||||
void initializeMessageDateFormats();
|
||||
|
@ -441,21 +441,21 @@
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="m_cmbUnreadIconType"/>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="m_checkKeppMessagesInTheMiddle">
|
||||
<property name="text">
|
||||
<string>Keep article selection in the middle of the article list viewport</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="m_checkMultilineArticleList">
|
||||
<property name="text">
|
||||
<string>Enable multiline items</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="HelpSpoiler" name="m_helpMultilineArticleList" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@ -465,7 +465,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Row height</string>
|
||||
@ -475,7 +475,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="5" column="1">
|
||||
<widget class="QSpinBox" name="m_spinHeightRowsMessages">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@ -494,7 +494,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Top/bottom row padding</string>
|
||||
@ -504,7 +504,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="6" column="1">
|
||||
<widget class="QSpinBox" name="m_spinPaddingRowsMessages">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@ -523,7 +523,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<item row="7" column="0">
|
||||
<widget class="QCheckBox" name="m_checkMessagesDateTimeFormat">
|
||||
<property name="text">
|
||||
<string>Use custom date/time format</string>
|
||||
@ -536,7 +536,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<item row="7" column="1">
|
||||
<widget class="QComboBox" name="m_cmbMessagesDateTimeFormat">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@ -550,9 +550,9 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QCheckBox" name="m_checkMessagesTimeFormat">
|
||||
<widget class="QCheckBox" name="m_checkMessagesDateTimeFormatForDatesOnly">
|
||||
<property name="text">
|
||||
<string>Custom date/time format for today's articles</string>
|
||||
<string>Use custom date/time format for dates-only</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
@ -563,7 +563,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QComboBox" name="m_cmbMessagesTimeFormat">
|
||||
<widget class="QComboBox" name="m_cmbMessagesDateTimeFormatForDatesOnly">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
@ -576,13 +576,39 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QCheckBox" name="m_checkMessagesTimeFormat">
|
||||
<property name="text">
|
||||
<string>Custom date/time format for today's articles</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QComboBox" name="m_cmbMessagesTimeFormat">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Show relative time for articles not older than</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<item row="10" column="1">
|
||||
<widget class="QSpinBox" name="m_spinRelativeArticleTime">
|
||||
<property name="minimum">
|
||||
<number>-1</number>
|
||||
@ -592,7 +618,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<item row="11" column="0">
|
||||
<widget class="QGroupBox" name="m_gbArticleListFont">
|
||||
<property name="title">
|
||||
<string>Article list font</string>
|
||||
@ -624,29 +650,33 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QComboBox" name="m_cmbMessagesDateTimeFormatForDatesOnly">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<item row="1" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QComboBox" name="m_cmbArticleMarkingPolicy"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="m_spinArticleMarkingPolicy">
|
||||
<property name="suffix">
|
||||
<string notr="true"> ms</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>15000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QCheckBox" name="m_checkMessagesDateTimeFormatForDatesOnly">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Use custom date/time format for dates-only</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
<string>Upon article selection, mark as read</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -709,7 +739,6 @@
|
||||
<tabstop>m_cmbMessagesTimeFormat</tabstop>
|
||||
<tabstop>m_spinRelativeArticleTime</tabstop>
|
||||
<tabstop>m_btnChangeMessageListFont</tabstop>
|
||||
<tabstop>m_tabFeedsMessages</tabstop>
|
||||
<tabstop>m_gbFeedListFont</tabstop>
|
||||
<tabstop>m_gbArticleListFont</tabstop>
|
||||
</tabstops>
|
||||
|
@ -202,6 +202,12 @@ DVALUE(bool) Messages::UseCustomFormatForDatesOnlyDef = false;
|
||||
DKEY Messages::RelativeTimeForNewerArticles = "relative_time_for_new_articles";
|
||||
DVALUE(int) Messages::RelativeTimeForNewerArticlesDef = -1;
|
||||
|
||||
DKEY Messages::ArticleMarkOnSelection = "mark_message_on_selected";
|
||||
DVALUE(int) Messages::ArticleMarkOnSelectionDef = int(MessagesView::ArticleMarkingPolicy::MarkImmediately);
|
||||
|
||||
DKEY Messages::ArticleMarkOnSelectionDelay = "mark_message_on_selected_delay";
|
||||
DVALUE(int) Messages::ArticleMarkOnSelectionDelayDef = 3000;
|
||||
|
||||
DKEY Messages::ArticleListPadding = "article_list_padding";
|
||||
DVALUE(int) Messages::ArticleListPaddingDef = -1;
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
#define SETTINGS_H
|
||||
|
||||
#include "definitions/definitions.h"
|
||||
#include "gui/messagesview.h"
|
||||
#include "gui/notifications/toastnotificationsmanager.h"
|
||||
#include "miscellaneous/settingsproperties.h"
|
||||
#include "miscellaneous/textfactory.h"
|
||||
@ -154,6 +155,12 @@ namespace Messages {
|
||||
KEY AvoidOldArticles;
|
||||
VALUE(bool) AvoidOldArticlesDef;
|
||||
|
||||
KEY ArticleMarkOnSelection;
|
||||
VALUE(int) ArticleMarkOnSelectionDef;
|
||||
|
||||
KEY ArticleMarkOnSelectionDelay;
|
||||
VALUE(int) ArticleMarkOnSelectionDelayDef;
|
||||
|
||||
KEY DateTimeToAvoidArticle;
|
||||
VALUE(QDateTime) DateTimeToAvoidArticleDef;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user