diff --git a/resources/text/CHANGELOG b/resources/text/CHANGELOG
index 46b12bea8..21ce16100 100755
--- a/resources/text/CHANGELOG
+++ b/resources/text/CHANGELOG
@@ -8,6 +8,7 @@ Main:
Added:
+▪ Global auto-update feed interval spinbox now has better format. (issue #176)
▪ Message preview's font is now fully adjustable in settings. (issue #177)
▪ RSS Guard now automatically switches to SQLite backend if MySQL is not available on program startup.
▪ Newspaper view now allows marking individual messages read/unread/starred/unstarred.
diff --git a/src/gui/dialogs/formsettings.ui b/src/gui/dialogs/formsettings.ui
index 3dbcae00b..b27f8810b 100755
--- a/src/gui/dialogs/formsettings.ui
+++ b/src/gui/dialogs/formsettings.ui
@@ -1251,7 +1251,7 @@ Authors of this application are NOT responsible for lost data.
-
- 1
+ 0
@@ -1275,25 +1275,6 @@ Authors of this application are NOT responsible for lost data.
- -
-
-
- false
-
-
- minutes
-
-
- 5
-
-
- 240
-
-
- 15
-
-
-
-
@@ -1355,6 +1336,19 @@ Authors of this application are NOT responsible for lost data.
+ -
+
+
+ false
+
+
+ false
+
+
+ true
+
+
+
@@ -1549,6 +1543,11 @@ Authors of this application are NOT responsible for lost data.
1
+
+ TimeSpinBox
+ QDoubleSpinBox
+
+
m_cmbDatabaseDriver
@@ -1635,22 +1634,6 @@ Authors of this application are NOT responsible for lost data.
-
- m_checkAutoUpdate
- toggled(bool)
- m_spinAutoUpdateInterval
- setEnabled(bool)
-
-
- 324
- 48
-
-
- 597
- 49
-
-
-
m_checkMessagesDateTimeFormat
toggled(bool)
@@ -1699,5 +1682,21 @@ Authors of this application are NOT responsible for lost data.
+
+ m_checkAutoUpdate
+ toggled(bool)
+ m_spinAutoUpdateInterval
+ setEnabled(bool)
+
+
+ 324
+ 71
+
+
+ 707
+ 72
+
+
+
diff --git a/src/gui/timespinbox.cpp b/src/gui/timespinbox.cpp
new file mode 100644
index 000000000..be5f0014a
--- /dev/null
+++ b/src/gui/timespinbox.cpp
@@ -0,0 +1,61 @@
+// This file is part of RSS Guard.
+//
+// Copyright (C) 2011-2016 by Martin Rotter
+//
+// RSS Guard is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// RSS Guard is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with RSS Guard. If not, see .
+
+#include "gui/timespinbox.h"
+
+
+TimeSpinBox::TimeSpinBox(QWidget *parent) : QDoubleSpinBox(parent) {
+ setMinimum(5.0);
+ setAccelerated(true);
+ setDecimals(0);
+ setMaximum(10000000.0);
+}
+
+TimeSpinBox::~TimeSpinBox() {
+}
+
+double TimeSpinBox::valueFromText(const QString &text) const {
+ bool ok;
+ double value = text.toDouble(&ok);
+
+ if (ok) {
+ return value;
+ }
+ else {
+ return 0.0;
+ }
+}
+
+QString TimeSpinBox::textFromValue(double val) const {
+ int minutes_total = (int)val;
+ int minutes_val = minutes_total % 60;
+ int hours_val = (minutes_total - minutes_val) / 60;
+
+ QString hours = tr("%n hour(s)", "", hours_val);
+ QString minutes = tr("%n minute(s)", "", minutes_val);
+
+ return hours + tr(" and ") + minutes;
+}
+
+void TimeSpinBox::fixup(QString &input) const {
+ bool ok;
+ double value = input.toDouble(&ok);
+
+ if (ok) {
+ input = textFromValue(value);
+ }
+}
diff --git a/src/gui/timespinbox.h b/src/gui/timespinbox.h
new file mode 100644
index 000000000..74c7f1ebd
--- /dev/null
+++ b/src/gui/timespinbox.h
@@ -0,0 +1,34 @@
+// This file is part of RSS Guard.
+//
+// Copyright (C) 2011-2016 by Martin Rotter
+//
+// RSS Guard is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// RSS Guard is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with RSS Guard. If not, see .
+
+#ifndef TIMESPINBOX_H
+#define TIMESPINBOX_H
+
+#include
+
+
+class TimeSpinBox : public QDoubleSpinBox {
+ public:
+ explicit TimeSpinBox(QWidget *parent = 0);
+ virtual ~TimeSpinBox();
+
+ double valueFromText(const QString &text) const;
+ QString textFromValue(double val) const;
+ void fixup(QString &input) const;
+};
+
+#endif // TIMESPINBOX_H
diff --git a/src/services/standard/gui/formstandardfeeddetails.ui b/src/services/standard/gui/formstandardfeeddetails.ui
index 31b13fc7d..dc6dfebae 100755
--- a/src/services/standard/gui/formstandardfeeddetails.ui
+++ b/src/services/standard/gui/formstandardfeeddetails.ui
@@ -6,7 +6,7 @@
0
0
- 517
+ 622
442
@@ -96,28 +96,10 @@
-
-
+
false
-
-
- 130
- 16777215
-
-
-
- minutes
-
-
- 5
-
-
- 240
-
-
- 15
-
@@ -307,6 +289,12 @@
+
+ LabelWithStatus
+ QWidget
+
+ 1
+
LineEditWithStatus
QWidget
@@ -314,10 +302,9 @@
1
- LabelWithStatus
- QWidget
-
- 1
+ TimeSpinBox
+ QDoubleSpinBox
+
diff --git a/src/services/tt-rss/gui/formeditfeed.ui b/src/services/tt-rss/gui/formeditfeed.ui
index 62b04c096..62db8b751 100755
--- a/src/services/tt-rss/gui/formeditfeed.ui
+++ b/src/services/tt-rss/gui/formeditfeed.ui
@@ -6,7 +6,7 @@
0
0
- 469
+ 598
235
@@ -75,28 +75,10 @@
-
-
+
false
-
-
- 130
- 16777215
-
-
-
- minutes
-
-
- 5
-
-
- 240
-
-
- 15
-
@@ -169,6 +151,11 @@
1
+
+ TimeSpinBox
+ QDoubleSpinBox
+
+