[chronojump] Contacts top divides label_contacts_exercise_selected_options on 3 labels and 3 images. Fall on jump
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Contacts top divides label_contacts_exercise_selected_options on 3 labels and 3 images. Fall on jump
- Date: Tue, 23 Aug 2022 16:35:48 +0000 (UTC)
commit 92fc8b916ba08883b6eb8b493708137a219881d5
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Aug 23 18:34:34 2022 +0200
Contacts top divides label_contacts_exercise_selected_options on 3 labels and 3 images. Fall on jump
simple implemented.
glade/app1.glade | 133 ++++++++++++++++++++++++++++++++++-----
images/md/fall.png | Bin 0 -> 5783 bytes
src/Makefile.am | 1 +
src/gui/app1/chronojump.cs | 14 ++---
src/gui/app1/contactsExercise.cs | 122 +++++++++++++++++++++++++++--------
5 files changed, 222 insertions(+), 48 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 74321840c..c906a90ad 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -5250,18 +5250,114 @@ EncoderInertialCapture</property>
<property name="can_focus">False</property>
<property name="spacing">8</property>
<child>
- <widget class="GtkLabel"
id="label_contacts_exercise_selected_options">
+ <widget class="GtkHBox" id="hbox561">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">2</property>
+ <child>
+ <widget class="GtkImage"
id="image_contacts_exercise_selected_options1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property
name="stock">gtk-missing-image</property>
+ </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_options1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
</widget>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
+ <widget class="GtkHBox" id="hbox562">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">2</property>
+ <child>
+ <widget class="GtkImage"
id="image_contacts_exercise_selected_options2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property
name="stock">gtk-missing-image</property>
+ </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_options2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox563">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">2</property>
+ <child>
+ <widget class="GtkImage"
id="image_contacts_exercise_selected_options3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property
name="stock">gtk-missing-image</property>
+ </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_options3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
<widget class="GtkImage"
id="image_top_laterality_contacts">
<property name="width_request">24</property>
<property name="visible">True</property>
@@ -5271,7 +5367,7 @@ EncoderInertialCapture</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">3</property>
</packing>
</child>
</widget>
@@ -26130,6 +26226,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -32929,18 +33028,6 @@ Concentric</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkLabel"
id="label_video_encoder_tests_will_be_filmed">
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Tests
will be filmed</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
<widget class="GtkHBox"
id="hbox_video_encoder_capturing">
<property name="can_focus">False</property>
<property name="spacing">4</property>
@@ -32977,6 +33064,18 @@ Concentric</property>
</packing>
</child>
<child>
+ <widget class="GtkLabel"
id="label_video_encoder_tests_will_be_filmed">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Tests
will be filmed</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
<widget class="GtkHBox"
id="hbox_video_encoder_no_capturing">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -42412,6 +42511,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -50479,6 +50581,9 @@ Since Chronojump 2.1.3, backups contain the complete data.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
diff --git a/images/md/fall.png b/images/md/fall.png
new file mode 100644
index 000000000..92272145b
Binary files /dev/null and b/images/md/fall.png differ
diff --git a/src/Makefile.am b/src/Makefile.am
index ef1d2fcdf..ceb81b4ce 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -538,6 +538,7 @@ RESOURCES = \
../images/md/ic_jump_blue_2x.png,image_jump_2x.png \
../images/md/ic_jump_simple_blue_1x.png,image_jump_simple.png \
../images/md/ic_jump_reactive_blue_1x.png,image_jump_reactive.png \
+ ../images/md/fall.png,image_fall.png \
../images/md/run_blue_2x.png,run_2x.png \
../images/md/run_mov_blue_2x.png,run_mov_2x.png \
../images/md/run_blue_1x.png,image_run.png \
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 39b653a24..c18a5416d 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -3648,7 +3648,7 @@ public partial class ChronoJumpWindow
//blank exercise options: useful for changing from jumps or runs to forceSensor, runEncoder,
reaction time, other
label_contacts_exercise_selected_name.Visible = true; //will not be visible when all the
contacts_top combo is implemented
- label_contacts_exercise_selected_options.Text = "";
+ label_contacts_exercise_selected_options_blank ();
//on OSX R is not installed by default. Check if it's installed. Needed for encoder and force
sensor
if(
@@ -3669,7 +3669,7 @@ public partial class ChronoJumpWindow
hbox_contacts_sup_capture_analyze_two_buttons.Visible = true;
button_threshold.Visible = true;
- label_contacts_exercise_selected_options.Visible = true;
+ label_contacts_exercise_selected_options_visible (true);
image_top_laterality_contacts.Visible = false;
hbox_change_modes_jumps.Visible = true;
@@ -3730,7 +3730,7 @@ public partial class ChronoJumpWindow
hbox_contacts_sup_capture_analyze_two_buttons.Visible = true;
button_threshold.Visible = true;
- label_contacts_exercise_selected_options.Visible = true;
+ label_contacts_exercise_selected_options_visible (true);
image_top_laterality_contacts.Visible = false;
hbox_change_modes_runs.Visible = true;
@@ -3947,7 +3947,7 @@ public partial class ChronoJumpWindow
on_combo_force_sensor_exercise_changed (new object(), new EventArgs ());
//setLabelContactsExerciseSelectedOptionsForceSensor();
- label_contacts_exercise_selected_options.Visible = false;
+ label_contacts_exercise_selected_options_visible (false);
image_top_laterality_contacts.Visible = true;
setForceSensorLateralityPixbuf();
}
@@ -3983,7 +3983,7 @@ public partial class ChronoJumpWindow
forceSensorImageTestChange();
setLabelContactsExerciseSelected(m);
- label_contacts_exercise_selected_options.Visible = true;
+ label_contacts_exercise_selected_options_visible (false);
image_top_laterality_contacts.Visible = false;
createComboSelectContactsTop ();
@@ -4004,7 +4004,7 @@ public partial class ChronoJumpWindow
button_threshold.Visible = true;
//notebook_capture_analyze.GetNthPage(2).Hide(); //hide jumpsProfile on other tests
- label_contacts_exercise_selected_options.Visible = true;
+ label_contacts_exercise_selected_options_visible (true);
image_top_laterality_contacts.Visible = false;
}
else { //m == Constants.Modes.OTHER (contacts / other)
@@ -4024,7 +4024,7 @@ public partial class ChronoJumpWindow
button_threshold.Visible = true;
//notebook_capture_analyze.GetNthPage(2).Hide(); //hide jumpsProfile on other tests
- label_contacts_exercise_selected_options.Visible = true;
+ label_contacts_exercise_selected_options_visible (true);
image_top_laterality_contacts.Visible = false;
}
diff --git a/src/gui/app1/contactsExercise.cs b/src/gui/app1/contactsExercise.cs
index 7252e4d48..18d974e57 100644
--- a/src/gui/app1/contactsExercise.cs
+++ b/src/gui/app1/contactsExercise.cs
@@ -33,7 +33,12 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Button button_contacts_exercise;
[Widget] Gtk.Frame frame_image_test;
[Widget] Gtk.Label label_contacts_exercise_selected_name;
- [Widget] Gtk.Label label_contacts_exercise_selected_options;
+ [Widget] Gtk.Image image_contacts_exercise_selected_options1;
+ [Widget] Gtk.Image image_contacts_exercise_selected_options2;
+ [Widget] Gtk.Image image_contacts_exercise_selected_options3;
+ [Widget] Gtk.Label label_contacts_exercise_selected_options1;
+ [Widget] Gtk.Label label_contacts_exercise_selected_options2;
+ [Widget] Gtk.Label label_contacts_exercise_selected_options3;
[Widget] Gtk.HBox hbox_contacts_exercise_actions;
[Widget] Gtk.Button button_contacts_exercise_actions_edit_do;
[Widget] Gtk.Button button_contacts_exercise_actions_add_do;
@@ -155,6 +160,28 @@ public partial class ChronoJumpWindow
label_contacts_exercise_selected_name.Text = name;
}
+ private void label_contacts_exercise_selected_options_blank ()
+ {
+ image_contacts_exercise_selected_options1.Visible = false;
+ image_contacts_exercise_selected_options2.Visible = false;
+ image_contacts_exercise_selected_options3.Visible = false;
+
+ label_contacts_exercise_selected_options1.Text = "";
+ label_contacts_exercise_selected_options2.Text = "";
+ label_contacts_exercise_selected_options3.Text = "";
+ }
+
+ private void label_contacts_exercise_selected_options_visible (bool visible)
+ {
+ image_contacts_exercise_selected_options1.Visible = visible;
+ image_contacts_exercise_selected_options2.Visible = visible;
+ image_contacts_exercise_selected_options3.Visible = visible;
+
+ label_contacts_exercise_selected_options1.Visible = visible;
+ label_contacts_exercise_selected_options2.Visible = visible;
+ label_contacts_exercise_selected_options3.Visible = visible;
+ }
+
private void on_contacts_exercise_value_changed (object o, EventArgs args)
{
setLabelContactsExerciseSelectedOptions();
@@ -179,26 +206,37 @@ public partial class ChronoJumpWindow
LogB.Information("TT2");
string name = "";
- string sep = "";
if(((JumpType) currentEventType).HasWeight)
{
if(extra_window_jumps_radiobutton_weight.Active)
- name += sep + label_extra_window_jumps_radiobutton_weight_percent_as_kg.Text;
+ name = label_extra_window_jumps_radiobutton_weight_percent_as_kg.Text;
else
- name += sep + extra_window_jumps_spinbutton_weight.Value.ToString() + " kg";
- sep = "; ";
+ name = extra_window_jumps_spinbutton_weight.Value.ToString() + " kg";
+
+ label_contacts_exercise_selected_options1.Text = name;
+ image_contacts_exercise_selected_options1.Visible = false; //TODO: change to true
when have the image
+ } else {
+ label_contacts_exercise_selected_options1.Text = "";
+ image_contacts_exercise_selected_options1.Visible = false;
}
- if(((JumpType) currentEventType).HasFall (configChronojump.Compujump))
+
+ if( ((JumpType) currentEventType).HasFall (configChronojump.Compujump) &&
+ ! extra_window_jumps_check_dj_fall_calculate.Active )
{
- if(! extra_window_jumps_check_dj_fall_calculate.Active)
- {
- name += sep + extra_window_jumps_spinbutton_fall.Value.ToString() + " cm";
- sep = "; ";
- }
+ name = extra_window_jumps_spinbutton_fall.Value.ToString() + " cm";
+ label_contacts_exercise_selected_options2.Text = name;
+
+ image_contacts_exercise_selected_options2.Pixbuf =
+ new Pixbuf (null, Util.GetImagePath(false) + "image_fall.png");
+ image_contacts_exercise_selected_options2.Visible = true;
+ } else {
+ label_contacts_exercise_selected_options2.Text = "";
+ image_contacts_exercise_selected_options2.Visible = false;
}
- label_contacts_exercise_selected_options.Text = name;
+ label_contacts_exercise_selected_options3.Text = "";
+ image_contacts_exercise_selected_options3.Visible = false;
}
private void setLabelContactsExerciseSelectedOptionsJumpsReactive()
@@ -209,38 +247,57 @@ public partial class ChronoJumpWindow
LogB.Information("TT2");
string name = "";
- string sep = "";
if(((JumpType) currentEventType).FixedValue >= 0)
{
- name += extra_window_jumps_rj_spinbutton_limit.Value.ToString();
+ name = extra_window_jumps_rj_spinbutton_limit.Value.ToString();
if(((JumpType) currentEventType).JumpsLimited)
name += " " + Catalog.GetString("jumps");
else
name += " s";
- sep = "; ";
+ label_contacts_exercise_selected_options1.Text = name;
+ image_contacts_exercise_selected_options1.Visible = false; //TODO: change to true
when have the image;
+ } else {
+ label_contacts_exercise_selected_options1.Text = "";
+ image_contacts_exercise_selected_options1.Visible = false;
}
+
if(((JumpType) currentEventType).HasWeight)
{
if(extra_window_jumps_rj_radiobutton_weight.Active)
- name += sep +
label_extra_window_jumps_rj_radiobutton_weight_percent_as_kg.Text;
+ name = label_extra_window_jumps_rj_radiobutton_weight_percent_as_kg.Text;
else
- name += sep + extra_window_jumps_rj_spinbutton_weight.Value.ToString() + "
kg";
- sep = "; ";
+ name = extra_window_jumps_rj_spinbutton_weight.Value.ToString() + " kg";
+
+ label_contacts_exercise_selected_options2.Text = name;
+ image_contacts_exercise_selected_options2.Visible = false; //TODO: change to true
when have the image;
+ } else {
+ label_contacts_exercise_selected_options2.Text = "";
+ image_contacts_exercise_selected_options2.Visible = false;
}
+
if(((JumpType) currentEventType).HasFall (configChronojump.Compujump))
{
- name += sep + extra_window_jumps_rj_spinbutton_fall.Value.ToString() + " cm";
- sep = "; ";
+ name = extra_window_jumps_rj_spinbutton_fall.Value.ToString() + " cm";
+ label_contacts_exercise_selected_options3.Text = name;
+ image_contacts_exercise_selected_options3.Visible = false; //TODO: change to true
when have the image;
+ } else {
+ label_contacts_exercise_selected_options3.Text = "";
+ image_contacts_exercise_selected_options3.Visible = false;
}
-
- label_contacts_exercise_selected_options.Text = name;
}
private void setLabelContactsExerciseSelectedOptionsRunsSimple()
{
- label_contacts_exercise_selected_options.Text = label_runs_simple_track_distance_value.Text +
" " + label_runs_simple_track_distance_units.Text;
+ label_contacts_exercise_selected_options1.Text = label_runs_simple_track_distance_value.Text;
+ image_contacts_exercise_selected_options1.Visible = false; //TODO: change to true when have
the image;
+
+ label_contacts_exercise_selected_options2.Text = label_runs_simple_track_distance_units.Text;
+ image_contacts_exercise_selected_options2.Visible = false; //TODO: change to true when have
the image;
+
+ label_contacts_exercise_selected_options3.Text = "";
+ image_contacts_exercise_selected_options3.Visible = false;
}
private void setLabelContactsExerciseSelectedOptionsRunsInterval()
@@ -251,24 +308,35 @@ public partial class ChronoJumpWindow
LogB.Information("TT2");
string name = "";
- string sep = "";
if( ((RunType) currentEventType).Distance >= 0 )
{
name = label_runs_interval_track_distance_value.Text + " m";
- sep = "; ";
+ label_contacts_exercise_selected_options1.Text = name;
+ image_contacts_exercise_selected_options1.Visible = false; //TODO: change to true
when have the image;
+ } else {
+ label_contacts_exercise_selected_options1.Text = "";
+ image_contacts_exercise_selected_options1.Visible = false;
}
+
if( ! ((RunType) currentEventType).Unlimited )
{
- name += sep + extra_window_runs_interval_spinbutton_limit.Value;
+ name = extra_window_runs_interval_spinbutton_limit.Value.ToString();
if( ((RunType) currentEventType).TracksLimited )
name += " " + Catalog.GetString("laps");
else
name += " s";
+
+ label_contacts_exercise_selected_options2.Text = name;
+ image_contacts_exercise_selected_options2.Visible = false; //TODO: change to true
when have the image;
+ } else {
+ label_contacts_exercise_selected_options2.Text = "";
+ image_contacts_exercise_selected_options2.Visible = false;
}
- label_contacts_exercise_selected_options.Text = name;
+ label_contacts_exercise_selected_options3.Text = "";
+ image_contacts_exercise_selected_options3.Visible = false;
}
private void on_button_combo_select_contacts_top_left_clicked (object o, EventArgs args)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]