[chronojump] Scheduled backup preferences variables (and read from SQL)
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Scheduled backup preferences variables (and read from SQL)
- Date: Tue, 17 Aug 2021 17:36:38 +0000 (UTC)
commit 522af30e2c445b599e3bf4e7a020d4a0faa075b3
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Aug 17 19:34:12 2021 +0200
Scheduled backup preferences variables (and read from SQL)
src/preferences.cs | 6 ++++++
src/sqlite/preferences.cs | 11 +++++++++++
2 files changed, 17 insertions(+)
---
diff --git a/src/preferences.cs b/src/preferences.cs
index 373aca5cb..1fdade86f 100644
--- a/src/preferences.cs
+++ b/src/preferences.cs
@@ -209,6 +209,12 @@ public class Preferences
public Constants.MultimediaStorage multimediaStorage;
public string databaseVersion;
+ //backup
+ public string lastBackupDir;
+ public DateTime lastBackupDatetime; // merely informational
+ public DateTime backupScheduledCreatedDate;
+ public int backupScheduledNextDays;
+
//news
public bool newsLanguageEs; // on SQL
public string serverNewsDatetime; // NOT on SQL
diff --git a/src/sqlite/preferences.cs b/src/sqlite/preferences.cs
index a87409f26..cbf2deb60 100644
--- a/src/sqlite/preferences.cs
+++ b/src/sqlite/preferences.cs
@@ -533,6 +533,17 @@ class SqlitePreferences : Sqlite
else
preferences.restTimeSeconds = 0;
}
+
+ //backup
+ else if(reader[0].ToString() == LastBackupDirStr)
+ preferences.lastBackupDir = reader[1].ToString();
+ else if(reader[0].ToString() == LastBackupDatetimeStr)
+ preferences.lastBackupDatetime = UtilDate.FromSql(reader[1].ToString());
+ else if(reader[0].ToString() == BackupScheduledCreatedDateStr)
+ preferences.backupScheduledCreatedDate =
UtilDate.FromSql(reader[1].ToString());
+ else if(reader[0].ToString() == BackupScheduledNextDaysStr)
+ preferences.backupScheduledNextDays = Convert.ToInt32(reader[1].ToString());
+
else if(reader[0].ToString() == NewsLanguageEs )
preferences.newsLanguageEs = reader[1].ToString() == "True"; //bool
else if(reader[0].ToString() == ClientNewsDatetime )
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]