[chronojump] Force sensor show laterality icon at top
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Force sensor show laterality icon at top
- Date: Mon, 26 Oct 2020 14:23:15 +0000 (UTC)
commit 5516a3108b1689c236bee01d80686c8e134ab405
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Oct 26 15:23:00 2020 +0100
Force sensor show laterality icon at top
glade/app1.glade | 54 +++++++++++++++++++++++++++++++---------
src/gui/app1/chronojump.cs | 22 +++++++++++++++-
src/gui/app1/contactsExercise.cs | 2 ++
src/gui/app1/forceSensor.cs | 17 ++++++++++++-
src/gui/app1/icons.cs | 2 ++
5 files changed, 83 insertions(+), 14 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index cdcf898a..4f736a62 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -5839,6 +5839,10 @@ EncoderInertialCapture</property>
</packing>
</child>
<child>
+ <widget class="GtkHBox" id="hbox446">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
<widget class="GtkLabel"
id="label_contacts_exercise_selected_options">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -5847,6 +5851,26 @@ EncoderInertialCapture</property>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkImage"
id="image_top_laterality_contacts">
+ <property name="width_request">24</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property
name="stock">gtk-missing-image</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@@ -25044,6 +25068,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -27999,18 +28026,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>
@@ -28047,6 +28062,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>
@@ -36150,6 +36177,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 702ba5ba..ca04031e 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -2994,6 +2994,10 @@ public partial class ChronoJumpWindow
//notebook_capture_analyze.ShowTabs = true;
hbox_contacts_sup_capture_analyze_two_buttons.Visible = true;
alignment_button_threshold.Visible = true;
+
+ label_contacts_exercise_selected_options.Visible = true;
+ image_top_laterality_contacts.Visible = false;
+
if(m == Constants.Menuitem_modes.JUMPSSIMPLE)
{
notebooks_change(m);
@@ -3044,6 +3048,9 @@ public partial class ChronoJumpWindow
hbox_contacts_sup_capture_analyze_two_buttons.Visible = true;
alignment_button_threshold.Visible = true;
+ label_contacts_exercise_selected_options.Visible = true;
+ image_top_laterality_contacts.Visible = false;
+
if(m == Constants.Menuitem_modes.RUNSSIMPLE)
{
notebooks_change(m);
@@ -3216,7 +3223,11 @@ public partial class ChronoJumpWindow
//setLabelContactsExerciseSelected(m);
//better use the followin so we will have the Elastic/not elastic display on mode
change
on_combo_force_sensor_exercise_changed (new object(), new EventArgs ());
- setLabelContactsExerciseSelectedOptionsForceSensor();
+ //setLabelContactsExerciseSelectedOptionsForceSensor();
+
+ label_contacts_exercise_selected_options.Visible = false;
+ image_top_laterality_contacts.Visible = true;
+ setForceSensorLateralityPixbuf();
pixbufModeCurrent = new Pixbuf (null, Util.GetImagePath(false) +
"force_sensor_icon.png");
pixbufModeGrid = new Pixbuf (null, Util.GetImagePath(false) +
"image_modes_force.png");
@@ -3255,6 +3266,9 @@ public partial class ChronoJumpWindow
forceSensorImageTestChange();
setLabelContactsExerciseSelected(m);
+ label_contacts_exercise_selected_options.Visible = true;
+ image_top_laterality_contacts.Visible = false;
+
pixbufModeCurrent = new Pixbuf (null, Util.GetImagePath(false) +
"race_encoder_icon.png");
pixbufModeGrid = new Pixbuf (null, Util.GetImagePath(false) + "image_modes_run.png");
}
@@ -3272,6 +3286,9 @@ public partial class ChronoJumpWindow
alignment_button_threshold.Visible = true;
//notebook_capture_analyze.GetNthPage(2).Hide(); //hide jumpsProfile on other tests
+ label_contacts_exercise_selected_options.Visible = true;
+ image_top_laterality_contacts.Visible = false;
+
pixbufModeCurrent = new Pixbuf (null, Util.GetImagePath(false) +
"reaction_time_icon.png");
pixbufModeGrid = new Pixbuf (null, Util.GetImagePath(false) + "image_modes_rt.png");
}
@@ -3292,6 +3309,9 @@ public partial class ChronoJumpWindow
alignment_button_threshold.Visible = true;
//notebook_capture_analyze.GetNthPage(2).Hide(); //hide jumpsProfile on other tests
+ label_contacts_exercise_selected_options.Visible = true;
+ image_top_laterality_contacts.Visible = false;
+
pixbufModeCurrent = new Pixbuf (null, Util.GetImagePath(false) + "other_icon.png");
pixbufModeGrid = new Pixbuf (null, Util.GetImagePath(false) +
"image_modes_other.png");
}
diff --git a/src/gui/app1/contactsExercise.cs b/src/gui/app1/contactsExercise.cs
index 025540e9..8a364fa6 100644
--- a/src/gui/app1/contactsExercise.cs
+++ b/src/gui/app1/contactsExercise.cs
@@ -238,6 +238,7 @@ public partial class ChronoJumpWindow
label_contacts_exercise_selected_options.Text = name;
}
+ /* Now just showing laterality icon with setForceSensorLateralityPixbuf()
private void setLabelContactsExerciseSelectedOptionsForceSensor()
{
string name = Catalog.GetString("Laterality:");
@@ -250,4 +251,5 @@ public partial class ChronoJumpWindow
label_contacts_exercise_selected_options.Text = name;
}
+ */
}
diff --git a/src/gui/app1/forceSensor.cs b/src/gui/app1/forceSensor.cs
index 969b62c7..ebfdc14f 100644
--- a/src/gui/app1/forceSensor.cs
+++ b/src/gui/app1/forceSensor.cs
@@ -2866,7 +2866,8 @@ LogB.Information(" fs R ");
private void on_radio_force_sensor_laterality_toggled (object o, EventArgs args)
{
- setLabelContactsExerciseSelectedOptionsForceSensor();
+ //setLabelContactsExerciseSelectedOptionsForceSensor();
+ setForceSensorLateralityPixbuf();
}
private string getLaterality(bool translated)
@@ -2892,8 +2893,22 @@ LogB.Information(" fs R ");
radio_force_sensor_laterality_r.Active = true;
else //if(s == Constants.ForceSensorLateralityBoth)
radio_force_sensor_laterality_both.Active = true;
+
+ setForceSensorLateralityPixbuf();
}
+ private void setForceSensorLateralityPixbuf()
+ {
+ Pixbuf pixbuf;
+ if(radio_force_sensor_laterality_r.Active)
+ pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "laterality-right.png");
+ else if(radio_force_sensor_laterality_l.Active)
+ pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "laterality-left.png");
+ else
+ pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "laterality-both.png");
+
+ image_top_laterality_contacts.Pixbuf = pixbuf;
+ }
// -------------------------------- end of options, laterality and comment stuff ------
// ------------------------------------------------ slides stuff for presentations
diff --git a/src/gui/app1/icons.cs b/src/gui/app1/icons.cs
index 24d6bd6a..6db6e90c 100644
--- a/src/gui/app1/icons.cs
+++ b/src/gui/app1/icons.cs
@@ -123,6 +123,7 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Image image_encoder_eccon_concentric;
[Widget] Gtk.Image image_encoder_eccon_eccentric_concentric;
[Widget] Gtk.Image image_top_laterality;
+ [Widget] Gtk.Image image_top_laterality_contacts;
[Widget] Gtk.Image image_encoder_laterality_both;
[Widget] Gtk.Image image_encoder_laterality_r;
[Widget] Gtk.Image image_encoder_laterality_l;
@@ -294,6 +295,7 @@ public partial class ChronoJumpWindow
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "laterality-both.png");
image_top_laterality.Pixbuf = pixbuf;
+ image_top_laterality_contacts.Pixbuf = pixbuf;
image_encoder_laterality_both.Pixbuf = pixbuf;
image_force_sensor_laterality_both.Pixbuf = pixbuf;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]