[chronojump] On repair jumpRj, runI, pulse, show need enter or tab text



commit 15c29aac98a7ca92d6e531191c8da593a90f288c
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Jun 2 18:16:37 2022 +0200

    On repair jumpRj, runI, pulse, show need enter or tab text

 src/constants.cs | 10 +++++++++-
 src/gui/jump.cs  | 10 +++-------
 src/gui/pulse.cs |  5 +----
 src/gui/run.cs   |  5 +----
 4 files changed, 14 insertions(+), 16 deletions(-)
---
diff --git a/src/constants.cs b/src/constants.cs
index 52ec4b0e1..baad55c8b 100644
--- a/src/constants.cs
+++ b/src/constants.cs
@@ -993,7 +993,15 @@ public class Constants
                        "A simple method for field measurements of leg stiffness in hopping. " +
                        "Int J Sports Med 25: 170–176";
        }
-       
+
+       public static string GetRepairWindowMessage ()
+       {
+               System.Globalization.NumberFormatInfo localeInfo = new 
System.Globalization.NumberFormatInfo();
+               localeInfo = System.Globalization.NumberFormatInfo.CurrentInfo;
+               return string.Format(Catalog.GetString("Use this window to repair this test.\nDouble clic any 
cell to edit it (decimal separator: '{0}')"), localeInfo.NumberDecimalSeparator) +
+                       "\n" + Catalog.GetString ("Press enter or tab after editing a cell.");
+       }
+
        public const string PrefVersionAvailable = "versionAvailable";
        
        /*
diff --git a/src/gui/jump.cs b/src/gui/jump.cs
index 20193beb4..3e326c030 100644
--- a/src/gui/jump.cs
+++ b/src/gui/jump.cs
@@ -604,14 +604,10 @@ public class RepairJumpRjWindow
                this.jumpRj = myJump;
 
                //this.pDN = pDN;
-       
+
                repair_sub_event.Title = Catalog.GetString("Repair reactive jump");
-               
-               System.Globalization.NumberFormatInfo localeInfo = new 
System.Globalization.NumberFormatInfo();
-               localeInfo = System.Globalization.NumberFormatInfo.CurrentInfo;
-               label_header.Text = string.Format(Catalog.GetString("Use this window to repair this 
test.\nDouble clic any cell to edit it (decimal separator: '{0}')"), localeInfo.NumberDecimalSeparator);
-       
-               
+               label_header.Text = Constants.GetRepairWindowMessage ();
+
                jumpType = SqliteJumpType.SelectAndReturnJumpRjType(myJump.Type, false);
                
                TextBuffer tb = new TextBuffer (new TextTagTable());
diff --git a/src/gui/pulse.cs b/src/gui/pulse.cs
index 92bf3b19e..466ad6e9a 100644
--- a/src/gui/pulse.cs
+++ b/src/gui/pulse.cs
@@ -150,10 +150,7 @@ public class RepairPulseWindow
                this.myPulse = myPulse;
        
                repair_sub_event.Title = Catalog.GetString("Repair pulse");
-               
-               System.Globalization.NumberFormatInfo localeInfo = new 
System.Globalization.NumberFormatInfo();
-               localeInfo = System.Globalization.NumberFormatInfo.CurrentInfo;
-               label_header.Text = string.Format(Catalog.GetString("Use this window to repair this 
test.\nDouble clic any cell to edit it (decimal separator: '{0}')"), localeInfo.NumberDecimalSeparator);
+               label_header.Text = Constants.GetRepairWindowMessage ();
        
                
                pulseType = SqlitePulseType.SelectAndReturnPulseType(myPulse.Type);
diff --git a/src/gui/run.cs b/src/gui/run.cs
index 3a43c4b9c..3d1746445 100644
--- a/src/gui/run.cs
+++ b/src/gui/run.cs
@@ -593,10 +593,7 @@ public class RepairRunIntervalWindow
                this.runInterval = myRun;
        
                repair_sub_event.Title = Catalog.GetString("Repair intervallic race");
-               
-               System.Globalization.NumberFormatInfo localeInfo = new 
System.Globalization.NumberFormatInfo();
-               localeInfo = System.Globalization.NumberFormatInfo.CurrentInfo;
-               label_header.Text = string.Format(Catalog.GetString("Use this window to repair this 
test.\nDouble clic any cell to edit it (decimal separator: '{0}')"), localeInfo.NumberDecimalSeparator);
+               label_header.Text = Constants.GetRepairWindowMessage ();
        
                
                type = SqliteRunIntervalType.SelectAndReturnRunIntervalType(myRun.Type, false);


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