[chronojump] Fixed: 643495 Added salida lanzada tag (running start)
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixed: 643495 Added salida lanzada tag (running start)
- Date: Thu, 10 Mar 2011 17:32:45 +0000 (UTC)
commit 57d8a47dcf567a578659b113b5da4849626377b4
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Mar 10 18:31:45 2011 +0100
Fixed: 643495 Added salida lanzada tag (running start)
glade/chronojump.glade | 168 ++++++++++++++++++++++++++------------------
src/constants.cs | 2 +
src/gui/event.cs | 14 ++++
src/gui/jump.cs | 2 +
src/gui/multiChronopic.cs | 1 +
src/gui/pulse.cs | 1 +
src/gui/reactionTime.cs | 1 +
src/gui/run.cs | 20 ++++++
src/sqlite/main.cs | 23 ++++++-
9 files changed, 161 insertions(+), 71 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index 8674358..58ffb7b 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -11598,7 +11598,7 @@ Test</b></property>
<child>
<widget class="GtkTable" id="table42">
<property name="visible">True</property>
- <property name="n_rows">16</property>
+ <property name="n_rows">17</property>
<property name="n_columns">3</property>
<property name="column_spacing">4</property>
<property name="row_spacing">2</property>
@@ -11609,8 +11609,8 @@ Test</b></property>
<property name="label" translatable="yes">Flight time</property>
</widget>
<packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -11622,8 +11622,8 @@ Test</b></property>
<property name="label" translatable="yes">Falling height</property>
</widget>
<packing>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -11635,8 +11635,8 @@ Test</b></property>
<property name="label" translatable="yes">Extra weight</property>
</widget>
<packing>
- <property name="top_attach">9</property>
- <property name="bottom_attach">10</property>
+ <property name="top_attach">10</property>
+ <property name="bottom_attach">11</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -11661,8 +11661,8 @@ Test</b></property>
<property name="label" translatable="yes">Person</property>
</widget>
<packing>
- <property name="top_attach">12</property>
- <property name="bottom_attach">13</property>
+ <property name="top_attach">13</property>
+ <property name="bottom_attach">14</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -11677,8 +11677,8 @@ Test</b></property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">12</property>
- <property name="bottom_attach">13</property>
+ <property name="top_attach">13</property>
+ <property name="bottom_attach">14</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
@@ -11703,8 +11703,8 @@ Test</b></property>
<property name="label" translatable="yes">Limited by</property>
</widget>
<packing>
- <property name="top_attach">10</property>
- <property name="bottom_attach">11</property>
+ <property name="top_attach">11</property>
+ <property name="bottom_attach">12</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -11717,8 +11717,8 @@ Test</b></property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">10</property>
- <property name="bottom_attach">11</property>
+ <property name="top_attach">11</property>
+ <property name="bottom_attach">12</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -11730,8 +11730,8 @@ Test</b></property>
<property name="label" translatable="yes">Contact time</property>
</widget>
<packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -11745,8 +11745,8 @@ Test</b></property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="y_options"></property>
</packing>
</child>
@@ -11759,8 +11759,8 @@ Test</b></property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
<property name="y_options"></property>
</packing>
</child>
@@ -11773,8 +11773,8 @@ Test</b></property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
<property name="y_options"></property>
</packing>
</child>
@@ -11787,8 +11787,8 @@ Test</b></property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">9</property>
- <property name="bottom_attach">10</property>
+ <property name="top_attach">10</property>
+ <property name="bottom_attach">11</property>
<property name="y_options"></property>
</packing>
</child>
@@ -11799,8 +11799,8 @@ Test</b></property>
<property name="label" translatable="yes">Distance</property>
</widget>
<packing>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -11812,8 +11812,8 @@ Test</b></property>
<property name="label" translatable="yes">Time</property>
</widget>
<packing>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
+ <property name="top_attach">8</property>
+ <property name="bottom_attach">9</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -11825,8 +11825,8 @@ Test</b></property>
<property name="label" translatable="yes">Speed</property>
</widget>
<packing>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
+ <property name="top_attach">9</property>
+ <property name="bottom_attach">10</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -11840,8 +11840,8 @@ Test</b></property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
<property name="y_options"></property>
</packing>
</child>
@@ -11854,8 +11854,8 @@ Test</b></property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
+ <property name="top_attach">8</property>
+ <property name="bottom_attach">9</property>
<property name="y_options"></property>
</packing>
</child>
@@ -11867,8 +11867,8 @@ Test</b></property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
+ <property name="top_attach">9</property>
+ <property name="bottom_attach">10</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -11934,8 +11934,8 @@ Test</b></property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">15</property>
- <property name="bottom_attach">16</property>
+ <property name="top_attach">16</property>
+ <property name="bottom_attach">17</property>
<property name="y_options"></property>
</packing>
</child>
@@ -11947,8 +11947,8 @@ Test</b></property>
comments</property>
</widget>
<packing>
- <property name="top_attach">15</property>
- <property name="bottom_attach">16</property>
+ <property name="top_attach">16</property>
+ <property name="bottom_attach">17</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -11960,8 +11960,8 @@ comments</property>
<property name="label" translatable="yes">Angle</property>
</widget>
<packing>
- <property name="top_attach">11</property>
- <property name="bottom_attach">12</property>
+ <property name="top_attach">12</property>
+ <property name="bottom_attach">13</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -11976,8 +11976,8 @@ comments</property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">11</property>
- <property name="bottom_attach">12</property>
+ <property name="top_attach">12</property>
+ <property name="bottom_attach">13</property>
<property name="y_options"></property>
</packing>
</child>
@@ -12004,8 +12004,8 @@ comments</property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">14</property>
- <property name="bottom_attach">15</property>
+ <property name="top_attach">15</property>
+ <property name="bottom_attach">16</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
@@ -12016,8 +12016,8 @@ comments</property>
<property name="label" translatable="yes">Mistakes</property>
</widget>
<packing>
- <property name="top_attach">14</property>
- <property name="bottom_attach">15</property>
+ <property name="top_attach">15</property>
+ <property name="bottom_attach">16</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -12029,8 +12029,8 @@ comments</property>
<property name="label" translatable="yes">Video available</property>
</widget>
<packing>
- <property name="top_attach">13</property>
- <property name="bottom_attach">14</property>
+ <property name="top_attach">14</property>
+ <property name="bottom_attach">15</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -12082,8 +12082,8 @@ comments</property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">13</property>
- <property name="bottom_attach">14</property>
+ <property name="top_attach">14</property>
+ <property name="bottom_attach">15</property>
</packing>
</child>
<child>
@@ -12095,8 +12095,8 @@ comments</property>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -12110,8 +12110,8 @@ comments</property>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -12125,8 +12125,8 @@ comments</property>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
+ <property name="top_attach">8</property>
+ <property name="bottom_attach">9</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -12140,8 +12140,8 @@ comments</property>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
- <property name="top_attach">11</property>
- <property name="bottom_attach">12</property>
+ <property name="top_attach">12</property>
+ <property name="bottom_attach">13</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -12155,8 +12155,8 @@ comments</property>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -12170,8 +12170,8 @@ comments</property>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -12185,8 +12185,8 @@ comments</property>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
+ <property name="top_attach">9</property>
+ <property name="bottom_attach">10</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -12200,8 +12200,8 @@ comments</property>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
- <property name="top_attach">9</property>
- <property name="bottom_attach">10</property>
+ <property name="top_attach">10</property>
+ <property name="bottom_attach">11</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -12236,6 +12236,36 @@ comments</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label_run_start_title">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Start</property>
+ </widget>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label_run_start_value">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="position">1</property>
diff --git a/src/constants.cs b/src/constants.cs
index ceedb0e..e0359ca 100644
--- a/src/constants.cs
+++ b/src/constants.cs
@@ -483,4 +483,6 @@ public class Constants
public static string PhotoSmallTemp = "chronojump-last-photo-small";
public static string VideoTemp = "chronojump-last-video";
+ public static string RunStartInitialSpeedYes = Catalog.GetString("Running start. Started with initial speed.");
+ public static string RunStartInitialSpeedNo = Catalog.GetString("Standing start. Started without initial speed.");
}
diff --git a/src/gui/event.cs b/src/gui/event.cs
index b1c4f7d..eb2755c 100644
--- a/src/gui/event.cs
+++ b/src/gui/event.cs
@@ -42,6 +42,8 @@ public class EditEventWindow
[Widget] protected Gtk.Label label_header;
[Widget] protected Gtk.Label label_type_title;
[Widget] protected Gtk.Label label_type_value;
+ [Widget] protected Gtk.Label label_run_start_title;
+ [Widget] protected Gtk.Label label_run_start_value;
[Widget] protected Gtk.Label label_event_id_value;
[Widget] protected Gtk.Label label_tv_title;
[Widget] protected Gtk.Entry entry_tv_value;
@@ -103,6 +105,7 @@ public class EditEventWindow
protected Constants.TestTypes typeOfTest;
protected bool showType;
+ protected bool showRunStart;
protected bool showTv;
protected bool showTc;
protected bool showFall;
@@ -152,6 +155,7 @@ public class EditEventWindow
protected virtual void initializeValues () {
typeOfTest = Constants.TestTypes.JUMP;
showType = true;
+ showRunStart = false;
showTv = true;
showTc = true;
showFall = true;
@@ -265,6 +269,13 @@ public class EditEventWindow
label_type_title.Hide();
combo_eventType.Hide();
}
+
+ if(showRunStart)
+ fillRunStart(myEvent);
+ else {
+ label_run_start_title.Hide();
+ label_run_start_value.Hide();
+ }
ArrayList persons = SqlitePersonSession.SelectCurrentSessionPersons(myEvent.SessionID);
string [] personsStrings = new String[persons.Count];
@@ -361,6 +372,9 @@ public class EditEventWindow
protected virtual void fillFall(Event myEvent) {
}
+ protected virtual void fillRunStart(Event myEvent) {
+ }
+
protected virtual void fillDistance(Event myEvent) {
/*
Run myRun = (Run) myEvent;
diff --git a/src/gui/jump.cs b/src/gui/jump.cs
index fbdda14..8c7bd72 100644
--- a/src/gui/jump.cs
+++ b/src/gui/jump.cs
@@ -82,6 +82,7 @@ public class EditJumpWindow : EditEventWindow
protected override void initializeValues () {
typeOfTest = Constants.TestTypes.JUMP;
showType = true;
+ showRunStart = false;
showTv = true;
showTc= true;
showFall = true;
@@ -308,6 +309,7 @@ public class EditJumpRjWindow : EditJumpWindow
protected override void initializeValues () {
typeOfTest = Constants.TestTypes.JUMP_RJ;
showType = true;
+ showRunStart = false;
showTv = false;
showTc = false;
showFall = true;
diff --git a/src/gui/multiChronopic.cs b/src/gui/multiChronopic.cs
index c13ecbb..6c64f49 100644
--- a/src/gui/multiChronopic.cs
+++ b/src/gui/multiChronopic.cs
@@ -78,6 +78,7 @@ public class EditMultiChronopicWindow : EditEventWindow
typeOfTest = Constants.TestTypes.MULTICHRONOPIC;
headerShowDecimal = false;
showType = false;
+ showRunStart = false;
showTv = false;
showTc= false;
showFall = false;
diff --git a/src/gui/pulse.cs b/src/gui/pulse.cs
index ea33399..c1e4096 100644
--- a/src/gui/pulse.cs
+++ b/src/gui/pulse.cs
@@ -70,6 +70,7 @@ public class EditPulseWindow : EditEventWindow
protected override void initializeValues () {
typeOfTest = Constants.TestTypes.PULSE;
showType = true;
+ showRunStart = false;
showTv = false;
showTc= false;
showFall = false;
diff --git a/src/gui/reactionTime.cs b/src/gui/reactionTime.cs
index 1e08f02..2b9f16a 100644
--- a/src/gui/reactionTime.cs
+++ b/src/gui/reactionTime.cs
@@ -72,6 +72,7 @@ public class EditReactionTimeWindow : EditEventWindow
typeOfTest = Constants.TestTypes.RT;
headerShowDecimal = false;
showType = false;
+ showRunStart = false;
showTv = false;
showTc= false;
showFall = false;
diff --git a/src/gui/run.cs b/src/gui/run.cs
index 0cc4259..232b4f1 100644
--- a/src/gui/run.cs
+++ b/src/gui/run.cs
@@ -83,6 +83,7 @@ public class EditRunWindow : EditEventWindow
protected override void initializeValues () {
typeOfTest = Constants.TestTypes.RUN;
showType = true;
+ showRunStart = true;
showTv = false;
showTc= false;
showFall = false;
@@ -105,6 +106,14 @@ public class EditRunWindow : EditEventWindow
return myTypes;
}
+ protected override void fillRunStart(Event myEvent) {
+ Run myRun = (Run) myEvent;
+ if(myRun.InitialSpeed)
+ label_run_start_value.Text = Constants.RunStartInitialSpeedYes;
+ else
+ label_run_start_value.Text = Constants.RunStartInitialSpeedNo;
+ }
+
protected override void fillDistance(Event myEvent) {
Run myRun = (Run) myEvent;
entryDistance = myRun.Distance.ToString();
@@ -283,6 +292,7 @@ public class EditRunIntervalWindow : EditRunWindow
protected override void initializeValues () {
typeOfTest = Constants.TestTypes.RUN_I;
showType = true;
+ showRunStart = true;
showTv = false;
showTc= false;
showFall = false;
@@ -480,6 +490,15 @@ public class EditRunIntervalWindow : EditRunWindow
return myTypes;
}
+ protected override void fillRunStart(Event myEvent) {
+ RunInterval myRun = (RunInterval) myEvent;
+ if(myRun.InitialSpeed)
+ label_run_start_value.Text = Constants.RunStartInitialSpeedYes;
+ else
+ label_run_start_value.Text = Constants.RunStartInitialSpeedNo;
+ }
+
+
protected override void fillDistance(Event myEvent) {
RunInterval myRun = (RunInterval) myEvent;
entry_distance_value.Text = myRun.DistanceInterval.ToString() +
@@ -1347,6 +1366,7 @@ public class RunsIntervalMoreWindow : EventMoreWindow
return SqliteRunInterval.SelectRuns(-1, -1, selectedEventName);
}
+
void on_button_cancel_clicked (object o, EventArgs args)
{
RunsIntervalMoreWindowBox.jumps_runs_more.Hide();
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index 9312d09..b63cda6 100644
--- a/src/sqlite/main.cs
+++ b/src/sqlite/main.cs
@@ -72,7 +72,7 @@ class Sqlite
* Important, change this if there's any update to database
* Important2: if database version get numbers higher than 1, check if the comparisons with currentVersion works ok
*/
- static string lastChronojumpDatabaseVersion = "0.80";
+ static string lastChronojumpDatabaseVersion = "0.81";
public Sqlite() {
}
@@ -1069,7 +1069,7 @@ class Sqlite
conversionRate ++;
convertTables(new SqliteRunInterval(), Constants.RunIntervalTable, 12, myArray, false);
conversionRate ++;
- Log.WriteLine("Converted DB to 0.80 (Added multimediaStorage structure)");
+ Log.WriteLine("Converted DB to 0.80 Added run and runInterval initial speed (if not done in 0.56 conversion)");
}
SqlitePreferences.Update ("databaseVersion", "0.80", true);
@@ -1077,6 +1077,24 @@ class Sqlite
dbcon.Close();
currentVersion = "0.80";
}
+ if(currentVersion == "0.80") {
+ dbcon.Open();
+
+ ArrayList myArray = new ArrayList(1);
+ myArray.Add("0"); //initial speed
+
+ conversionRateTotal = 2;
+ conversionRate = 1;
+ Sqlite.dropTable(Constants.TempRunIntervalTable);
+ sqliteRunIntervalObject.createTable(Constants.TempRunIntervalTable);
+ conversionRate ++;
+ Log.WriteLine("Converted DB to 0.81 Added tempRunInterval initial speed");
+
+ SqlitePreferences.Update ("databaseVersion", "0.81", true);
+
+ dbcon.Close();
+ currentVersion = "0.81";
+ }
}
//if changes are made here, remember to change also in CreateTables()
@@ -1209,6 +1227,7 @@ class Sqlite
SqliteCountry.initialize();
//changes [from - to - desc]
+ //0.80 - 0.81 Converted DB to 0.81 Added tempRunInterval initial speed
//0.79 - 0.80 Converted DB to 0.80 Added run and runInterval initial speed (if not done in 0.56 conversion)
//0.78 - 0.79 Converted DB to 0.79 (Added multimediaStorage structure id)
//0.77 - 0.78 Converted DB to 0.78 (Added machineID to preferences, takeOffWeight has no weight in db conversions since 0.66)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]