diff --git a/data/pref.xml b/data/pref.xml
index 50f5f2fa1..2cf5914e9 100644
--- a/data/pref.xml
+++ b/data/pref.xml
@@ -98,7 +98,7 @@
-
+
diff --git a/data/widgets/options.xml b/data/widgets/options.xml
index 5b566a257..75043bd9e 100644
--- a/data/widgets/options.xml
+++ b/data/widgets/options.xml
@@ -43,6 +43,9 @@
+
+
+
diff --git a/src/app/commands/cmd_options.cpp b/src/app/commands/cmd_options.cpp
index 977d58eac..3f8accd7d 100644
--- a/src/app/commands/cmd_options.cpp
+++ b/src/app/commands/cmd_options.cpp
@@ -252,7 +252,7 @@ public:
std::string warnings;
- int newPeriod = base::convert_to(dataRecoveryPeriod()->getValue());
+ double newPeriod = base::convert_to(dataRecoveryPeriod()->getValue());
if (enableDataRecovery()->isSelected() != m_pref.general.dataRecovery() ||
newPeriod != m_pref.general.dataRecoveryPeriod()) {
m_pref.general.dataRecovery(enableDataRecovery()->isSelected());
diff --git a/src/app/crash/backup_observer.cpp b/src/app/crash/backup_observer.cpp
index 4334fc2bd..260ae44fa 100644
--- a/src/app/crash/backup_observer.cpp
+++ b/src/app/crash/backup_observer.cpp
@@ -82,8 +82,8 @@ void BackupObserver::onRemoveDocument(doc::Document* document)
void BackupObserver::backgroundThread()
{
- int normalPeriod = 60*Preferences::instance().general.dataRecoveryPeriod();
- int lockedPeriod = 10;
+ int normalPeriod = int(60.0*Preferences::instance().general.dataRecoveryPeriod());
+ int lockedPeriod = 5;
#if 0 // Just for testing purposes
normalPeriod = 5;
lockedPeriod = 5;