This commit is contained in:
Martin Rotter 2017-06-06 10:27:08 +02:00
parent 3434d3d24e
commit 357663c8dc
6 changed files with 29 additions and 10 deletions

View File

@ -2,6 +2,7 @@
—————
Added:
▪ Auto-update notification is now switchable. (issue #119)
▪ Messages which are not removed or restored are not instantly deleted from list, they are striked-through instead. This is more resource friendly.
▪ Message list is now not reloaded when doing batch message operations.
▪ Message list SQL queries are now fully adjustable. This will allow for integration of labels functionality in the future.

View File

@ -37,6 +37,7 @@ SettingsFeedsMessages::SettingsFeedsMessages(Settings *settings, QWidget *parent
GuiUtilities::setLabelAsNotice(m_ui->label_9, false);
connect(m_ui->m_checkAutoUpdateNotification, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
connect(m_ui->m_checkAutoUpdate, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
connect(m_ui->m_checkKeppMessagesInTheMiddle, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
connect(m_ui->m_checkMessagesDateTimeFormat, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
@ -90,6 +91,7 @@ void SettingsFeedsMessages::changeMessagesFont() {
void SettingsFeedsMessages::loadSettings() {
onBeginLoadSettings();
m_ui->m_checkAutoUpdateNotification->setChecked(settings()->value(GROUP(Feeds), SETTING(Feeds::EnableAutoUpdateNotification)).toBool());
m_ui->m_checkKeppMessagesInTheMiddle->setChecked(settings()->value(GROUP(Messages), SETTING(Messages::KeepCursorInCenter)).toBool());
m_ui->m_checkRemoveReadMessagesOnExit->setChecked(settings()->value(GROUP(Messages), SETTING(Messages::ClearReadOnExit)).toBool());
m_ui->m_checkAutoUpdate->setChecked(settings()->value(GROUP(Feeds), SETTING(Feeds::AutoUpdateEnabled)).toBool());
@ -121,6 +123,7 @@ void SettingsFeedsMessages::loadSettings() {
void SettingsFeedsMessages::saveSettings() {
onBeginSaveSettings();
settings()->setValue(GROUP(Feeds), Feeds::EnableAutoUpdateNotification, m_ui->m_checkAutoUpdateNotification->isChecked());
settings()->setValue(GROUP(Messages), Messages::KeepCursorInCenter, m_ui->m_checkKeppMessagesInTheMiddle->isChecked());
settings()->setValue(GROUP(Messages), Messages::ClearReadOnExit, m_ui->m_checkRemoveReadMessagesOnExit->isChecked());
settings()->setValue(GROUP(Feeds), Feeds::AutoUpdateEnabled, m_ui->m_checkAutoUpdate->isChecked());

View File

@ -43,14 +43,14 @@
</property>
</widget>
</item>
<item row="1" column="0">
<item row="2" column="0">
<widget class="QCheckBox" name="m_checkAutoUpdate">
<property name="text">
<string>Auto-update all feeds every</string>
</property>
</widget>
</item>
<item row="1" column="1">
<item row="2" column="1">
<widget class="TimeSpinBox" name="m_spinAutoUpdateInterval">
<property name="enabled">
<bool>false</bool>
@ -63,14 +63,14 @@
</property>
</widget>
</item>
<item row="2" column="0">
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Feed connection timeout</string>
</property>
</widget>
</item>
<item row="2" column="1">
<item row="3" column="1">
<widget class="QSpinBox" name="m_spinFeedUpdateTimeout">
<property name="toolTip">
<string>Connection timeout is time interval which is reserved for downloading new messages for the feed. If this time interval elapses, then download process is aborted.</string>
@ -89,14 +89,14 @@
</property>
</widget>
</item>
<item row="3" column="0">
<item row="4" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Message count format in feed list</string>
</property>
</widget>
</item>
<item row="3" column="1">
<item row="4" column="1">
<widget class="QComboBox" name="m_cmbCountsFeedList">
<property name="toolTip">
<string notr="true"/>
@ -106,7 +106,7 @@
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<item row="5" column="0" colspan="2">
<widget class="QLabel" name="label_9">
<property name="font">
<font>
@ -124,6 +124,13 @@
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="m_checkAutoUpdateNotification">
<property name="text">
<string>Enable &quot;auto-update started&quot; notification</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="m_tabMessages">

View File

@ -208,9 +208,11 @@ void FeedReader::executeNextAutoUpdate() {
// NOTE: OSD/bubble informing about performing
// of scheduled update can be shown now.
qApp->showGuiMessage(tr("Starting auto-update of some feeds"),
tr("I will auto-update %n feed(s).", 0, feeds_for_update.size()),
QSystemTrayIcon::Information);
if (qApp->settings()->value(GROUP(Feeds), SETTING(Feeds::EnableAutoUpdateNotification)).toBool()) {
qApp->showGuiMessage(tr("Starting auto-update of some feeds"),
tr("I will auto-update %n feed(s).", 0, feeds_for_update.size()),
QSystemTrayIcon::Information);
}
}
}

View File

@ -31,6 +31,9 @@ DKEY Feeds::ID = "feeds";
DKEY Feeds::UpdateTimeout = "feed_update_timeout";
DVALUE(int) Feeds::UpdateTimeoutDef = DOWNLOAD_TIMEOUT;
DKEY Feeds::EnableAutoUpdateNotification = "enable_auto_update_notification";
DVALUE(bool) Feeds::EnableAutoUpdateNotificationDef = true;
DKEY Feeds::CountFormat = "count_format";
DVALUE(char*) Feeds::CountFormatDef = "(%unread)";

View File

@ -46,6 +46,9 @@ namespace Feeds {
KEY UpdateTimeout;
VALUE(int) UpdateTimeoutDef;
KEY EnableAutoUpdateNotification;
VALUE(bool) EnableAutoUpdateNotificationDef;
KEY CountFormat;
VALUE(char*) CountFormatDef;