[chronojump] gui/About: shows also DB version



commit e7e7bbb1d4d9acf3bd7674fb7980a98a10f32f8d
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Mar 1 11:51:09 2022 +0100

    gui/About: shows also DB version

 src/gui/app1/chronojump.cs | 13 +++++++++++++
 1 file changed, 13 insertions(+)
---
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 1ff198497..4800768c4 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -7599,6 +7599,19 @@ LogB.Debug("mc finished 5");
                if(translator_credits == "translator-credits") 
                        translator_credits = "";
 
+               //DB version
+               if(File.Exists(System.IO.Path.Combine(Util.GetDatabaseDir(), "chronojump.db"))) {
+                       try {
+                               Sqlite.Connect();
+                               progVersion += "\nDB version: " + SqlitePreferences.Select("databaseVersion", 
false);
+                               Sqlite.DisConnect();
+                       }
+                       catch {
+                               Console.WriteLine("Cannot check DB version, failed checking");
+                               Sqlite.DisConnect();
+                       }
+               }
+
                new About(progVersion, translator_credits);
        }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]