[chronojump] DB:1.95 importerPythonVersion
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] DB:1.95 importerPythonVersion
- Date: Mon, 1 Jun 2020 08:42:00 +0000 (UTC)
commit e198aace4c7e4e3c17120ed74d12e0cd34dd109a
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Jun 1 10:41:16 2020 +0200
DB:1.95 importerPythonVersion
src/preferences.cs | 6 ++----
src/sqlite/main.cs | 17 ++++++++---------
src/sqlite/preferences.cs | 7 ++++++-
3 files changed, 16 insertions(+), 14 deletions(-)
---
diff --git a/src/preferences.cs b/src/preferences.cs
index c55fb3b9..429902f7 100644
--- a/src/preferences.cs
+++ b/src/preferences.cs
@@ -143,10 +143,8 @@ public class Preferences
public bool muteLogs;
public bool networksAllowChangeDevices; //managed on preferences;
- /*
- public enum pythonVersion { Python, Python2, Python3 };
- public PythonVersion importerPythonVersion;
- */
+ public enum pythonVersionEnum { Python, Python2, Python3 };
+ public pythonVersionEnum importerPythonVersion;
/*
* these are NOT sent to preferences window
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index 86f55827..d4b45021 100644
--- a/src/sqlite/main.cs
+++ b/src/sqlite/main.cs
@@ -129,7 +129,7 @@ class Sqlite
/*
* Important, change this if there's any update to database
*/
- static string lastChronojumpDatabaseVersion = "1.94";
+ static string lastChronojumpDatabaseVersion = "1.95";
public Sqlite()
{
@@ -2712,17 +2712,17 @@ class Sqlite
currentVersion = updateVersion("1.94");
}
- /*
if(currentVersion == "1.94")
{
LogB.SQL("Inserted into preferences: importerPythonVersion");
- SqlitePreferences.Insert (Preferences.importerPythonVersion,
- Preferences.pythonVersion.Python.ToString());
+ SqlitePreferences.Insert (SqlitePreferences.ImporterPythonVersion,
+ Preferences.pythonVersionEnum.Python.ToString());
currentVersion = updateVersion("1.95");
}
- */
+
+
/*
if(currentVersion == "1.79")
{
@@ -2935,10 +2935,9 @@ class Sqlite
//changes [from - to - desc]
//just testing: 1.79 - 1.80 Converted DB to 1.80 Created table ForceSensorElasticBandGlue and moved
stiffnessString records there
-//just testing: 1.94 - 1.95 Converted DB to 1.95 Inserted into preferences: importerPythonVersion
-//
-//
-//
+
+
+ //1.94 - 1.95 Converted DB to 1.95 Inserted into preferences: importerPythonVersion
//1.93 - 1.94 Converted DB to 1.94 Inserted into preferences:
RunEncoderAnalyzeAccel/Force/Power
//1.92 - 1.93 Converted DB to 1.93 Inserted into preferences: EncoderCaptureInfinite,
LogoAnimatedShow
//1.91 - 1.92 Converted DB to 1.92 Inserted into preferences: menuType
diff --git a/src/sqlite/preferences.cs b/src/sqlite/preferences.cs
index 69b21bec..5ba3a7e6 100644
--- a/src/sqlite/preferences.cs
+++ b/src/sqlite/preferences.cs
@@ -90,6 +90,8 @@ class SqlitePreferences : Sqlite
//runEncoder
public const string RunEncoderMinAccel = "runEncoderMinAccel";
+ //advanced
+ public const string ImporterPythonVersion = "importerPythonVersion";
protected internal static new void createTable()
{
@@ -272,7 +274,7 @@ class SqlitePreferences : Sqlite
Insert (EncoderAutoSaveCurveBestNValue, "3", dbcmdTr);
Insert ("email", "", dbcmdTr);
Insert ("muteLogs", "False", dbcmdTr);
- //Insert (Preferences.importerPythonVersion,
Preferences.pythonVersion.Python.ToString(), dbcmdTr);
+ Insert (ImporterPythonVersion,
Preferences.pythonVersionEnum.Python.ToString(), dbcmdTr);
//removed on 1.37
@@ -630,6 +632,9 @@ class SqlitePreferences : Sqlite
else if(reader[0].ToString() == "multimediaStorage")
preferences.multimediaStorage = (Constants.MultimediaStorage)
Enum.Parse(typeof(Constants.MultimediaStorage),
reader[1].ToString());
+ else if(reader[0].ToString() == ImporterPythonVersion)
+ preferences.importerPythonVersion = (Preferences.pythonVersionEnum)
+ Enum.Parse(typeof(Preferences.pythonVersionEnum),
reader[1].ToString());
else if(reader[0].ToString() == "databaseVersion")
preferences.databaseVersion = reader[1].ToString();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]