[chronojump] Minor change
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Minor change
- Date: Thu, 21 Jul 2016 15:27:20 +0000 (UTC)
commit 78c55d2ea9944d1096e2e1f1070aef28e0f1db17
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Jul 21 17:23:24 2016 +0200
Minor change
src/constants.cs | 1 +
src/gui/chronojump.cs | 4 ++--
src/sqlite/session.cs | 4 ++--
3 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/constants.cs b/src/constants.cs
index 6f723f9..a8760ad 100644
--- a/src/constants.cs
+++ b/src/constants.cs
@@ -166,6 +166,7 @@ public class Constants
public const string Weight = "weight";
//session
+ public const string SessionSimulatedName = "SIMULATED"; //Do NOT translate this
public static string SessionProtected = Catalog.GetString("Sorry, this session cannot be modified.");
//SIMULATED session
//server
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 2a919b1..a4a1f81 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -2585,7 +2585,7 @@ public partial class ChronoJumpWindow
{
LogB.Information("edit session");
- if(currentSession.Name == "SIMULATED")
+ if(currentSession.Name == Constants.SessionSimulatedName)
new DialogMessage(Constants.MessageTypes.INFO, Constants.SessionProtected);
else {
sessionAddEditWin = SessionAddEditWindow.Show(app1, currentSession);
@@ -2662,7 +2662,7 @@ public partial class ChronoJumpWindow
{
LogB.Information("--- delete session ---");
- if(currentSession.Name == "SIMULATED")
+ if(currentSession.Name == Constants.SessionSimulatedName)
new DialogMessage(Constants.MessageTypes.INFO, Constants.SessionProtected);
else {
ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Are you sure you
want to delete the current session"), "", Catalog.GetString("and all the session tests?"));
diff --git a/src/sqlite/session.cs b/src/sqlite/session.cs
index c3d3a81..73dc560 100644
--- a/src/sqlite/session.cs
+++ b/src/sqlite/session.cs
@@ -84,8 +84,8 @@ class SqliteSession : Sqlite
protected internal static void insertSimulatedSession()
{
- if(! Sqlite.Exists (true, Constants.SessionTable, "SIMULATED"))
- Insert(true, Constants.SessionTable, "-1", "SIMULATED", "", DateTime.Today,
+ if(! Sqlite.Exists (true, Constants.SessionTable, Constants.SessionSimulatedName))
+ Insert(true, Constants.SessionTable, "-1", Constants.SessionSimulatedName, "",
DateTime.Today,
Constants.SportUndefinedID, Constants.SpeciallityUndefinedID,
Constants.LevelUndefinedID,
Catalog.GetString("Use this session to simulate tests."),
Constants.ServerUndefinedID);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]