Work on auto-updates.

This commit is contained in:
Martin Rotter 2014-02-03 18:16:48 +01:00
parent 3e148606b7
commit 43b2d82e2b
3 changed files with 55 additions and 2 deletions

View File

@ -154,10 +154,15 @@ void FormSettings::selectBrowserExecutable() {
void FormSettings::loadFeedsMessages() {
m_ui->m_checkRemoveReadMessagesOnExit->setChecked(Settings::instance()->value(APP_CFG_MESSAGES, "clear_read_on_exit", false).toBool());
m_ui->m_checkAutoUpdate->setChecked(Settings::instance()->value(APP_CFG_FEEDS, "auto_update_enabled", false).toBool());
m_ui->m_spinAutoUpdateInterval->setValue(Settings::instance()->value(APP_CFG_FEEDS, "auto_update_interval", DEFAULT_AUTO_UPDATE_INTERVAL).toInt());
}
void FormSettings::saveFeedsMessages() {
Settings::instance()->setValue(APP_CFG_MESSAGES, "clear_read_on_exit", m_ui->m_checkRemoveReadMessagesOnExit->isChecked());
Settings::instance()->setValue(APP_CFG_FEEDS, "auto_update_enabled", m_ui->m_checkAutoUpdate->isChecked());
Settings::instance()->setValue(APP_CFG_FEEDS, "auto_update_interval", m_ui->m_spinAutoUpdateInterval->value());
}
void FormSettings::displayProxyPassword(int state) {

View File

@ -17,7 +17,7 @@
<item row="0" column="1">
<widget class="QStackedWidget" name="m_stackedSettings">
<property name="currentIndex">
<number>0</number>
<number>5</number>
</property>
<widget class="QWidget" name="m_pageGeneral">
<layout class="QFormLayout" name="formLayout_5">
@ -754,6 +754,34 @@ Authors of this application are NOT responsible for lost data.</string>
<attribute name="title">
<string>Feeds</string>
</attribute>
<layout class="QFormLayout" name="formLayout_10">
<item row="0" column="0">
<widget class="QCheckBox" name="m_checkAutoUpdate">
<property name="text">
<string>Auto-update all feeds every</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="m_spinAutoUpdateInterval">
<property name="enabled">
<bool>false</bool>
</property>
<property name="suffix">
<string> minutes</string>
</property>
<property name="minimum">
<number>5</number>
</property>
<property name="maximum">
<number>240</number>
</property>
<property name="value">
<number>15</number>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="m_tabMessages">
<attribute name="title">
@ -925,5 +953,21 @@ Authors of this application are NOT responsible for lost data.</string>
</hint>
</hints>
</connection>
<connection>
<sender>m_checkAutoUpdate</sender>
<signal>toggled(bool)</signal>
<receiver>m_spinAutoUpdateInterval</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>324</x>
<y>48</y>
</hint>
<hint type="destinationlabel">
<x>597</x>
<y>49</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -109,7 +109,11 @@
<item row="6" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QComboBox" name="m_cmbAutoUpdateType"/>
<widget class="QComboBox" name="m_cmbAutoUpdateType">
<property name="toolTip">
<string>Select the auto-update strategy for this feed. Default auto-update strategy means that the feed will be update in time intervals set in application settings.</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="m_spinAutoUpdateInterval">