[chronojump] DB: 2.13 Inserted prefs: PersonSelectWinImages, ExportGraphWidth, ExportGraphHeight
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] DB: 2.13 Inserted prefs: PersonSelectWinImages, ExportGraphWidth, ExportGraphHeight
- Date: Tue, 9 Mar 2021 10:25:16 +0000 (UTC)
commit d9055c275f4331df4c2feb955e2d5456d1051a6c
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Mar 9 11:22:04 2021 +0100
DB: 2.13 Inserted prefs: PersonSelectWinImages, ExportGraphWidth, ExportGraphHeight
src/preferences.cs | 7 ++++++-
src/sqlite/main.cs | 17 ++++++++++++++++-
src/sqlite/preferences.cs | 20 ++++++++++++++++++++
3 files changed, 42 insertions(+), 2 deletions(-)
---
diff --git a/src/preferences.cs b/src/preferences.cs
index cb837654..a8187549 100644
--- a/src/preferences.cs
+++ b/src/preferences.cs
@@ -187,7 +187,8 @@ public class Preferences
/*
* these are NOT managed on preferences window
*/
-
+
+ public bool personSelectWinImages;
public bool allowFinishRjAfterTime;
public bool volumeOn;
public bool videoOn;
@@ -260,6 +261,10 @@ public class Preferences
public bool debugMode;
+ //export
+ public int exportGraphWidth;
+ public int exportGraphHeight;
+
/*
* these are unused on SqlitePreferences.SelectAll
*/
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index 7669abef..cb1b339d 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 = "2.12";
+ static string lastChronojumpDatabaseVersion = "2.13";
public Sqlite()
{
@@ -2877,6 +2877,20 @@ class Sqlite
currentVersion = updateVersion("2.12");
}
+ if(currentVersion == "2.12")
+ {
+ LogB.SQL("Inserted into preferences: PersonSelectWinImages, ExportGraphWidth,
ExportGraphHeight");
+
+ SqlitePreferences.Insert (SqlitePreferences.PersonSelectWinImages, "True");
+ SqlitePreferences.Insert (SqlitePreferences.ExportGraphWidth, "900");
+ SqlitePreferences.Insert (SqlitePreferences.ExportGraphHeight, "600");
+
+ currentVersion = updateVersion("2.13");
+ }
+
+
+
+
/*
if(currentVersion == "1.79")
{
@@ -3094,6 +3108,7 @@ class Sqlite
//just testing: 1.79 - 1.80 Converted DB to 1.80 Created table ForceSensorElasticBandGlue and moved
stiffnessString records there
+ //2.12 - 2.13 Converted DB to 2.13 Inserted prefs: PersonSelectWinImages, ExportGraphWidth,
ExportGraphHeight
//2.11 - 2.12 Converted DB to 2.12 Inserted prefs: forceSensorAnalyzeMaxAVGInWindow
//2.10 - 2.11 Converted DB to 2.11 Inserted prefs: clientNewsDatetime
//2.09 - 2.10 Converted DB to 2.10 Inserted prefs: encoderCaptureShowLoss, runEncoderPPS
diff --git a/src/sqlite/preferences.cs b/src/sqlite/preferences.cs
index d856dd9c..caab9b6a 100644
--- a/src/sqlite/preferences.cs
+++ b/src/sqlite/preferences.cs
@@ -36,6 +36,9 @@ class SqlitePreferences : Sqlite
public const string RestTimeMinutes = "restTimeMinutes";
public const string RestTimeSeconds = "restTimeSeconds";
+ //person (appearance)
+ public const string PersonSelectWinImages = "personSelectWinImages";
+
//news stuff
public const string NewsLanguageEs = "newsLanguageEs";
public const string ServerNewsDatetime = "serverNewsDatetime"; // NOT stored on SQL. string of last
news in server, obtained on pingAtNewsAtStart
@@ -117,6 +120,10 @@ class SqlitePreferences : Sqlite
public const string LoadLastModeAtStart = "loadLastModeAtStart";
public const string LastMode = "lastMode";
+ //export
+ public const string ExportGraphWidth = "exportGraphWidth";
+ public const string ExportGraphHeight = "exportGraphHeight";
+
protected internal static new void createTable()
{
dbcmd.CommandText =
@@ -145,6 +152,7 @@ class SqlitePreferences : Sqlite
Insert ("maximized", Preferences.MaximizedTypes.NO.ToString(), dbcmdTr);
Insert ("personWinHide", "False", dbcmdTr);
Insert ("personPhoto", "True", dbcmdTr);
+ Insert (PersonSelectWinImages, "True", dbcmdTr);
Insert (MenuType, Preferences.MenuTypes.ALL.ToString(), dbcmdTr);
Insert (LogoAnimatedShow, "True", dbcmdTr);
Insert (ColorBackground, "#0e1e46", dbcmdTr);
@@ -332,6 +340,10 @@ class SqlitePreferences : Sqlite
Insert (LoadLastModeAtStart, "True", dbcmdTr);
Insert (LastMode, Constants.Menuitem_modes.UNDEFINED.ToString(), dbcmdTr);
+ //export
+ Insert (ExportGraphWidth, "900", dbcmdTr);
+ Insert (ExportGraphHeight, "600", dbcmdTr);
+
//removed on 1.37
//Insert ("encoderConfiguration", new
EncoderConfiguration().ToStringOutput(EncoderConfiguration.Outputs.SQL), dbcmdTr);
@@ -435,6 +447,8 @@ class SqlitePreferences : Sqlite
preferences.personWinHide = reader[1].ToString() == "True";
else if(reader[0].ToString() == "personPhoto")
preferences.personPhoto = reader[1].ToString() == "True";
+ else if(reader[0].ToString() == PersonSelectWinImages)
+ preferences.personSelectWinImages = reader[1].ToString() == "True";
else if(reader[0].ToString() == MenuType)
preferences.menuType = (Preferences.MenuTypes)
Enum.Parse(typeof(Preferences.MenuTypes), reader[1].ToString());
@@ -767,6 +781,12 @@ class SqlitePreferences : Sqlite
else if(reader[0].ToString() == LastMode)
preferences.lastMode = (Constants.Menuitem_modes)
Enum.Parse(typeof(Constants.Menuitem_modes), reader[1].ToString());
+
+ //export
+ else if(reader[0].ToString() == ExportGraphWidth)
+ preferences.exportGraphWidth = Convert.ToInt32(reader[1].ToString());
+ else if(reader[0].ToString() == ExportGraphHeight)
+ preferences.exportGraphHeight = Convert.ToInt32(reader[1].ToString());
}
reader.Close();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]