[chronojump] label_contacts_exercise_selected shows selected ex. of all modes
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] label_contacts_exercise_selected shows selected ex. of all modes
- Date: Thu, 5 Dec 2019 17:11:45 +0000 (UTC)
commit a1560fb1b982ee4c1685c43dc446058cb0667914
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Dec 5 18:11:12 2019 +0100
label_contacts_exercise_selected shows selected ex. of all modes
glade/app1.glade | 25 ++++++++++++++++++++++++-
src/gui/chronojump.cs | 15 ++++++++-------
src/gui/forceSensor.cs | 1 +
src/gui/jump.cs | 3 +++
src/gui/multiChronopic.cs | 2 ++
src/gui/pulse.cs | 4 +++-
src/gui/reactionTime.cs | 7 +++++--
src/gui/run.cs | 2 ++
src/gui/runEncoder.cs | 7 ++++++-
9 files changed, 54 insertions(+), 12 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 3668193c..6e8c5c8c 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -5181,7 +5181,6 @@ EncoderInertialCapture</property>
<property name="receives_default">False</property>
<property name="relief">none</property>
<property name="draw_indicator">False</property>
- <property
name="group">radio_mode_multi_chronopic_small</property>
<signal name="toggled"
handler="on_radio_mode_pulses_small_toggled" swapped="no"/>
<child>
<widget class="GtkHBox" id="hbox120">
@@ -5229,6 +5228,7 @@ EncoderInertialCapture</property>
<property name="receives_default">False</property>
<property name="relief">none</property>
<property name="draw_indicator">False</property>
+ <property name="group">radio_mode_pulses_small</property>
<signal name="toggled"
handler="on_radio_mode_multi_chronopic_small_toggled" swapped="no"/>
<child>
<widget class="GtkHBox" id="hbox132">
@@ -5643,6 +5643,11 @@ EncoderInertialCapture</property>
<property name="left_padding">4</property>
<property name="right_padding">6</property>
<child>
+ <widget class="GtkHBox" id="hbox152">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">8</property>
+ <child>
<widget class="GtkButton"
id="button_contacts_exercise">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -5657,6 +5662,24 @@ EncoderInertialCapture</property>
</widget>
</child>
</widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_contacts_exercise_selected">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
</child>
</widget>
</child>
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 37bc62a9..1cfff735 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -219,6 +219,7 @@ public partial class ChronoJumpWindow
//tests
[Widget] Gtk.Button button_contacts_exercise;
+ [Widget] Gtk.Label label_contacts_exercise_selected;
[Widget] Gtk.Notebook notebook_contacts_capture_doing_wait;
[Widget] Gtk.Button button_contacts_bells;
[Widget] Gtk.Button button_contacts_capture_load;
@@ -2081,7 +2082,7 @@ public partial class ChronoJumpWindow
sensitiveLastTestButtons(false);
string myText = UtilGtk.ComboGetActive(combo);
- LogB.Information("Selected: " + myText);
+ LogB.Information("Selected: " + myText);
//show extra window options
on_extra_window_jumps_test_changed(o, args);
@@ -3368,8 +3369,6 @@ public partial class ChronoJumpWindow
button_contacts_capture_load.Sensitive = myTreeViewPersons.IsThereAnyRecord();
button_contacts_bells.Sensitive = true;
-// on_extra_window_reaction_times_test_changed(new object(), new EventArgs());
-
//notebook_capture_analyze.ShowTabs = false; //only capture tab is shown (only valid
for "OTHER" tests)
hbox_contacts_sup_capture_analyze_two_buttons.Visible = true;
button_threshold.Visible = false;
@@ -3380,6 +3379,7 @@ public partial class ChronoJumpWindow
//on force sensor only show table
notebook_capture_graph_table.CurrentPage = 1; //"Show table"
notebook_capture_graph_table.ShowTabs = false;
+ label_contacts_exercise_selected.Text =
UtilGtk.ComboGetActive(combo_force_sensor_exercise);
}
else if(m == Constants.Menuitem_modes.RUNSENCODER)
{
@@ -3390,8 +3390,6 @@ public partial class ChronoJumpWindow
vbox_contacts_signal_comment.Visible = true;
button_contacts_capture_load.Sensitive = myTreeViewPersons.IsThereAnyRecord();
-// on_extra_window_reaction_times_test_changed(new object(), new EventArgs());
-
//notebook_capture_analyze.ShowTabs = false; //only capture tab is shown (only valid
for "OTHER" tests)
hbox_contacts_sup_capture_analyze_two_buttons.Visible = true;
button_threshold.Visible = false;
@@ -3406,7 +3404,7 @@ public partial class ChronoJumpWindow
combo_race_analyzer_device.Active = 0;
forceSensorImageTestChange();
-
+ label_contacts_exercise_selected.Text =
UtilGtk.ComboGetActive(combo_run_encoder_exercise);
}
else if(m == Constants.Menuitem_modes.RT)
{
@@ -3424,7 +3422,10 @@ public partial class ChronoJumpWindow
notebook_sup.CurrentPage = 0;
hbox_other.Visible = true;
notebooks_change(m);
- on_extra_window_reaction_times_test_changed(new object(), new EventArgs());
+ if(radio_mode_pulses_small.Active)
+ on_extra_window_pulses_test_changed(new object(), new EventArgs());
+ else
+ on_extra_window_multichronopic_test_changed(new object(), new EventArgs());
notebook_capture_analyze.CurrentPage = 0;
//notebook_capture_analyze.ShowTabs = false; //only capture tab is shown (only valid
for "OTHER" tests)
diff --git a/src/gui/forceSensor.cs b/src/gui/forceSensor.cs
index b5968a27..3f46a1b6 100644
--- a/src/gui/forceSensor.cs
+++ b/src/gui/forceSensor.cs
@@ -2322,6 +2322,7 @@ LogB.Information(" fs R ");
button_force_sensor_stiffness.Visible = false;
image_button_force_sensor_stiffness_problem.Visible = false;
}
+ label_contacts_exercise_selected.Text = Catalog.GetString(fse.Name);
}
private void fillForceSensorExerciseCombo(string name)
diff --git a/src/gui/jump.cs b/src/gui/jump.cs
index 56866210..b0898f21 100644
--- a/src/gui/jump.cs
+++ b/src/gui/jump.cs
@@ -1119,6 +1119,8 @@ public partial class ChronoJumpWindow
{
currentEventType = myJumpType;
changeTestImage(EventType.Types.JUMP.ToString(), myJumpType.Name, myJumpType.ImageFileName);
+ label_contacts_exercise_selected.Text = UtilGtk.ComboGetActive(combo_select_jumps);
+
if(myJumpType.HasWeight) {
extra_window_showWeightData(myJumpType, true);
@@ -1216,6 +1218,7 @@ public partial class ChronoJumpWindow
{
currentEventType = myJumpType;
changeTestImage(EventType.Types.JUMP.ToString(), myJumpType.Name, myJumpType.ImageFileName);
+ label_contacts_exercise_selected.Text = UtilGtk.ComboGetActive(combo_select_jumps_rj);
checkbutton_allow_finish_rj_after_time.Visible = false;
if(myJumpType.FixedValue >= 0) {
diff --git a/src/gui/multiChronopic.cs b/src/gui/multiChronopic.cs
index 6c22ac7c..abb6b109 100644
--- a/src/gui/multiChronopic.cs
+++ b/src/gui/multiChronopic.cs
@@ -77,8 +77,10 @@ public partial class ChronoJumpWindow
bool showRunDistance = false;
if(myMultiChronopicType.Name == Constants.MultiChronopicName) {
showSyncAndDeleteFirst = true;
+ label_contacts_exercise_selected.Text = Catalog.GetString("Multi Chronopic");
} else if(myMultiChronopicType.Name == Constants.RunAnalysisName) {
showRunDistance = true;
+ label_contacts_exercise_selected.Text = Catalog.GetString("Race analysis");
}
extra_window_multichronopic_showSyncAndDeleteFirst(showSyncAndDeleteFirst);
extra_window_multichronopic_showRunDistance(showRunDistance);
diff --git a/src/gui/pulse.cs b/src/gui/pulse.cs
index 2b57a43f..5ab7ffc2 100644
--- a/src/gui/pulse.cs
+++ b/src/gui/pulse.cs
@@ -153,7 +153,9 @@ public partial class ChronoJumpWindow
hasOptions = true;
extra_window_pulses_spinbutton_pulse_step.Value = extra_window_pulseStep;
extra_window_pulses_spinbutton_total_pulses.Value = extra_window_totalPulses;
- }
+ label_contacts_exercise_selected.Text = Catalog.GetString("Custom");
+ } else
+ label_contacts_exercise_selected.Text = Catalog.GetString("Free");
extra_window_pulses_showNoOptions(hasOptions);
}
diff --git a/src/gui/reactionTime.cs b/src/gui/reactionTime.cs
index 89e3d5cf..246f8ba1 100644
--- a/src/gui/reactionTime.cs
+++ b/src/gui/reactionTime.cs
@@ -53,24 +53,27 @@ public partial class ChronoJumpWindow
sensitiveLastTestButtons(false);
- changeTestImage("","", "reaction_time.png");
-
currentReactionTimeType = new ReactionTimeType("reactionTime");
+ changeTestImage("","", "reaction_time.png");
+ label_contacts_exercise_selected.Text = Catalog.GetString("Reaction time");
if(extra_window_radio_reaction_time_animation_lights.Active) {
hbox_animation_lights.Visible = true;
currentReactionTimeType = new ReactionTimeType("anticipation");
changeTestImage("","", "reaction_time_discriminative.png");
+ label_contacts_exercise_selected.Text = Catalog.GetString("Animation lights");
}
else if(extra_window_radio_reaction_time_flicker.Active) {
hbox_flicker_lights.Visible = true;
currentReactionTimeType = new ReactionTimeType("flickr");
changeTestImage("","", "reaction_time_discriminative.png");
+ label_contacts_exercise_selected.Text = Catalog.GetString("Flicker");
}
else if(extra_window_radio_reaction_time_discriminative.Active) {
hbox_discriminative_lights.Visible = true;
currentReactionTimeType = new ReactionTimeType("Discriminative");
changeTestImage("","", "reaction_time_discriminative.png");
+ label_contacts_exercise_selected.Text = Catalog.GetString("Discriminative");
}
label_reaction_time_device_help.Visible = (
diff --git a/src/gui/run.cs b/src/gui/run.cs
index 73fb3111..8020ee12 100644
--- a/src/gui/run.cs
+++ b/src/gui/run.cs
@@ -979,6 +979,7 @@ public partial class ChronoJumpWindow
{
currentEventType = myRunType;
changeTestImage(EventType.Types.RUN.ToString(), myRunType.Name, myRunType.ImageFileName);
+ label_contacts_exercise_selected.Text = UtilGtk.ComboGetActive(combo_select_runs);
label_runs_simple_track_distance_units.Text = "m";
@@ -1034,6 +1035,7 @@ public partial class ChronoJumpWindow
{
currentEventType = myRunType;
changeTestImage(EventType.Types.RUN.ToString(), myRunType.Name, myRunType.ImageFileName);
+ label_contacts_exercise_selected.Text = UtilGtk.ComboGetActive(combo_select_runs_interval);
if(myRunType.Distance > 0) {
label_runs_interval_track_distance_value.Text = myRunType.Distance.ToString();
diff --git a/src/gui/runEncoder.cs b/src/gui/runEncoder.cs
index 230b27a1..98349ca2 100644
--- a/src/gui/runEncoder.cs
+++ b/src/gui/runEncoder.cs
@@ -1225,11 +1225,16 @@ LogB.Information(" re R ");
combo_run_encoder_exercise = ComboBox.NewText ();
fillRunEncoderExerciseCombo("");
-// combo_run_encoder_exercise.Changed += new EventHandler
(on_combo_run_encoder_exercise_changed);
+ combo_run_encoder_exercise.Changed += new EventHandler
(on_combo_run_encoder_exercise_changed);
hbox_combo_run_encoder_exercise.PackStart(combo_run_encoder_exercise, true, true, 0);
hbox_combo_run_encoder_exercise.ShowAll();
}
+ private void on_combo_run_encoder_exercise_changed(object o, EventArgs args)
+ {
+ label_contacts_exercise_selected.Text = UtilGtk.ComboGetActive(combo_run_encoder_exercise);
+ }
+
private void fillRunEncoderExerciseCombo(string name)
{
ArrayList runEncoderExercises = SqliteRunEncoderExercise.Select (false, -1, false);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]