[chronojump] DB: 2.00 Inserted into preferences: fontsOnGraphs
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] DB: 2.00 Inserted into preferences: fontsOnGraphs
- Date: Fri, 2 Oct 2020 10:50:50 +0000 (UTC)
commit 0d81c350d4b69716108783ad1cd7ca90446cceae
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Oct 2 12:46:15 2020 +0200
DB: 2.00 Inserted into preferences: fontsOnGraphs
src/preferences.cs | 2 ++
src/sqlite/main.cs | 11 ++++++++++-
src/sqlite/preferences.cs | 5 +++++
3 files changed, 17 insertions(+), 1 deletion(-)
---
diff --git a/src/preferences.cs b/src/preferences.cs
index c5cbea8c..ea58f6b9 100644
--- a/src/preferences.cs
+++ b/src/preferences.cs
@@ -40,6 +40,8 @@ public class Preferences
public bool colorBackgroundIsDark; //this is assigned when colorBackgroundString changes. And this is
used by the rest of the program. Not stored on SQL.
public bool colorBackgroundOsColor;
public bool logoAnimatedShow;
+ public enum FontTypes { Courier, Helvetica};
+ public FontTypes fontType;
public bool loadLastSessionAtStart;
public int lastSessionID;
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index 1ed09369..c7ab64a0 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.99";
+ static string lastChronojumpDatabaseVersion = "2.00";
public Sqlite()
{
@@ -2763,6 +2763,14 @@ class Sqlite
"name", "Agility-3L3R");
currentVersion = updateVersion("1.99");
}
+ if(currentVersion == "1.99")
+ {
+ LogB.SQL("Inserted into preferences: fontsOnGraphs");
+
+ SqlitePreferences.Insert (SqlitePreferences.FontsOnGraphs,
Preferences.FontTypes.Courier.ToString());
+
+ currentVersion = updateVersion("2.00");
+ }
/*
if(currentVersion == "1.79")
@@ -2978,6 +2986,7 @@ class Sqlite
//just testing: 1.79 - 1.80 Converted DB to 1.80 Created table ForceSensorElasticBandGlue and moved
stiffnessString records there
+ //1.93 - 2.00 Converted DB to 2.00 Inserted into preferences: fontsOnGraphs
//1.98 - 1.99 Converted DB to 1.99 Updated 3L3R tracks fixedValue (just affected description)
//1.97 - 1.98 Converted DB to 1.98 Inserted into preferences: colorBackgroundOsColor
//1.96 - 1.97 Converted DB to 1.97 Inserted into preferences: loadLastSessionAtStart,
lastSessionID, loadLastModAtStart, lastMode
diff --git a/src/sqlite/preferences.cs b/src/sqlite/preferences.cs
index 43068e03..29038bdb 100644
--- a/src/sqlite/preferences.cs
+++ b/src/sqlite/preferences.cs
@@ -32,6 +32,7 @@ class SqlitePreferences : Sqlite
public const string ColorBackground = "colorBackground";
public const string ColorBackgroundOsColor = "colorBackgroundOsColor";
public const string LogoAnimatedShow = "logoAnimatedShow";
+ public const string FontsOnGraphs = "fontsOnGraphs";
//contacts
public const string JumpsFVProfileOnlyBestInWeight = "jumpsFVProfileOnlyBestInWeight";
@@ -134,6 +135,7 @@ class SqlitePreferences : Sqlite
Insert (LogoAnimatedShow, "True", dbcmdTr);
Insert (ColorBackground, "#0e1e46", dbcmdTr);
Insert (ColorBackgroundOsColor, "False", dbcmdTr);
+ Insert (FontsOnGraphs, Preferences.FontTypes.Courier.ToString(), dbcmdTr);
Insert (UnitsStr, Preferences.UnitsEnum.METRIC.ToString(), dbcmdTr);
Insert (EncoderCaptureInfinite, "False", dbcmdTr);
Insert ("encoderCaptureShowOnlyBars", "True", dbcmdTr);
@@ -419,6 +421,9 @@ class SqlitePreferences : Sqlite
preferences.colorBackgroundOsColor = reader[1].ToString() == "True";
else if(reader[0].ToString() == LogoAnimatedShow)
preferences.logoAnimatedShow = reader[1].ToString() == "True";
+ else if(reader[0].ToString() == FontsOnGraphs)
+ preferences.fontType = (Preferences.FontTypes)
+ Enum.Parse(typeof(Preferences.FontTypes), reader[1].ToString());
else if(reader[0].ToString() == UnitsStr)
preferences.units = (Preferences.UnitsEnum)
Enum.Parse(typeof(Preferences.UnitsEnum), reader[1].ToString());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]