[chronojump] Encoder exercise stuff opens below (DONE)
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder exercise stuff opens below (DONE)
- Date: Sun, 19 Feb 2017 00:11:08 +0000 (UTC)
commit c7741df8189c353701acedbf08344cae920a01e0
Author: Xavier de Blas <xaviblas gmail com>
Date: Sun Feb 19 00:50:56 2017 +0100
Encoder exercise stuff opens below (DONE)
glade/app1.glade | 293 ++++++++++++++++++++++++++++-------
images/md/ic_close_red_24dp_1x.png | Bin 0 -> 335 bytes
src/Makefile.am | 2 +-
src/gui/chronojump.cs | 9 +-
src/gui/encoder.cs | 48 +++++-
5 files changed, 282 insertions(+), 70 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index d9a85eb..18f5d9f 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -14151,6 +14151,14 @@ Concentric</property>
<property name="label_yalign">0</property>
<property name="shadow_type">in</property>
<child>
+ <widget class="GtkAlignment" id="alignment23">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">10</property>
+ <property name="bottom_padding">10</property>
+ <property name="left_padding">6</property>
+ <property name="right_padding">6</property>
+ <child>
<widget class="GtkHBox" id="hbox80">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -14177,7 +14185,7 @@ Concentric</property>
</widget>
<packing>
<property name="expand">True</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
@@ -14198,7 +14206,7 @@ Concentric</property>
<property name="can_focus">False</property>
<property name="spacing">10</property>
<child>
- <widget class="GtkLabel"
id="label_encoder_exercise">
+ <widget class="GtkLabel"
id="label_encoder_top_exercise">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property
name="label">label_encoder_exercise</property>
@@ -14210,7 +14218,7 @@ Concentric</property>
</packing>
</child>
<child>
- <widget class="GtkLabel"
id="label_encoder_contraction">
+ <widget class="GtkLabel"
id="label_encoder_top_eccon">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label">contraction</property>
@@ -14222,7 +14230,7 @@ Concentric</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label_encoder_rl">
+ <widget class="GtkLabel"
id="label_encoder_top_laterality">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label">RL</property>
@@ -14235,21 +14243,112 @@ Concentric</property>
</child>
</widget>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkNotebook"
id="notebook_encoder_top">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
+ <child>
+ <widget class="GtkHBox" id="hbox96">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">10</property>
+ <child>
+ <widget class="GtkLabel"
id="label_encoder_top_extra_mass">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">label</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
+ <widget class="GtkLabel"
id="label_encoder_top_1RM_percent">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">label</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
<widget class="GtkLabel" id="label85">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">Mass stuff</property>
+ <property name="label">gravity</property>
</widget>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox131">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">10</property>
+ <child>
+ <widget class="GtkLabel"
id="label_encoder_top_weights">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">label</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_encoder_top_im">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">label</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label139">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">inertia</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
@@ -14262,6 +14361,8 @@ Concentric</property>
</child>
</widget>
</child>
+ </widget>
+ </child>
<child>
<placeholder/>
<packing>
@@ -14270,8 +14371,8 @@ Concentric</property>
</child>
</widget>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
@@ -14972,16 +15073,20 @@ Concentric</property>
<property name="left_padding">10</property>
<property name="right_padding">10</property>
<child>
+ <widget class="GtkHBox" id="hbox27">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
<widget class="GtkVBox" id="vbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">25</property>
+ <property name="spacing">40</property>
<child>
<widget class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="n_rows">2</property>
- <property name="n_columns">2</property>
+ <property name="n_columns">3</property>
<property name="column_spacing">10</property>
<property name="row_spacing">20</property>
<child>
@@ -14999,6 +15104,7 @@ Concentric</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">10</property>
+ <property name="homogeneous">True</property>
<child>
<widget class="GtkHBox" id="hbox86">
<property name="visible">True</property>
@@ -15069,8 +15175,8 @@ Concentric</property>
</child>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
@@ -15111,15 +15217,16 @@ Concentric</property>
</child>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
@@ -15131,17 +15238,18 @@ Concentric</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">10</property>
+ <property name="homogeneous">True</property>
<child>
<widget class="GtkHBox" id="hbox47">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">4</property>
+ <property name="spacing">12</property>
<child>
<widget class="GtkHBox"
id="hbox_encoder_capture_extra_mass_no_raspberry">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip"
translatable="yes">Extra mass</property>
- <property name="spacing">8</property>
+ <property name="spacing">12</property>
<child>
<widget class="GtkLabel"
id="label_encoder_extra_weight_text">
<property name="visible">True</property>
@@ -15156,7 +15264,6 @@ Concentric</property>
</child>
<child>
<widget class="GtkSpinButton"
id="spin_encoder_extra_weight">
- <property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
<property name="width_chars">3</property>
@@ -15178,18 +15285,6 @@ Concentric</property>
<property name="position">1</property>
</packing>
</child>
- <child>
- <widget class="GtkLabel"
id="label_encoder_extra_weight_label_kg">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label">Kg</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -15199,11 +15294,14 @@ Concentric</property>
</child>
<child>
<widget class="GtkHBox"
id="hbox_encoder_capture_extra_mass_raspberry">
+ <property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">2</property>
+ <property name="spacing">8</property>
<child>
<widget class="GtkButton"
id="button_encoder_raspberry_extra_weight_minus_10">
<property name="label">-10</property>
+ <property name="width_request">50</property>
+ <property name="height_request">40</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -15212,14 +15310,16 @@ Concentric</property>
<signal name="clicked"
handler="on_button_encoder_raspberry_extra_weight_minus_10_clicked" swapped="no"/>
</widget>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkButton"
id="button_encoder_raspberry_extra_weight_minus_1">
<property name="label"> -1 </property>
+ <property name="width_request">40</property>
+ <property name="height_request">40</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -15234,6 +15334,11 @@ Concentric</property>
</packing>
</child>
<child>
+ <widget class="GtkHBox" id="hbox45">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">4</property>
+ <child>
<widget class="GtkEntry"
id="entry_raspberry_extra_weight">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -15241,7 +15346,8 @@ Concentric</property>
<property name="has_frame">False</property>
<property name="invisible_char">●</property>
<property name="width_chars">3</property>
- <property name="text">10</property>
+ <property name="text">1</property>
+ <property name="xalign">1</property>
<property name="shadow_type">none</property>
<property
name="invisible_char_set">True</property>
<property
name="primary_icon_activatable">False</property>
@@ -15251,14 +15357,36 @@ Concentric</property>
<signal name="changed"
handler="on_entry_raspberry_extra_weight_changed" swapped="no"/>
</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_encoder_extra_weight_label_kg">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">Kg</property>
+ </widget>
+ <packing>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<widget class="GtkButton"
id="button_encoder_raspberry_extra_weight_plus_1">
<property name="label"> +1 </property>
+ <property name="width_request">40</property>
+ <property name="height_request">40</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -15267,14 +15395,16 @@ Concentric</property>
<signal name="clicked"
handler="on_button_encoder_raspberry_extra_weight_plus_1_clicked" swapped="no"/>
</widget>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
<child>
<widget class="GtkButton"
id="button_encoder_raspberry_extra_weight_plus_10">
<property name="label">+10</property>
+ <property name="width_request">50</property>
+ <property name="height_request">40</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -15297,21 +15427,21 @@ Concentric</property>
</child>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox45">
+ <widget class="GtkHBox" id="hbox49">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">20</property>
<child>
- <widget class="GtkHBox" id="hbox49">
+ <widget class="GtkHBox" id="hbox66">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">8</property>
+ <property name="spacing">12</property>
<child>
<widget class="GtkLabel" id="label137">
<property name="visible">True</property>
@@ -15426,21 +15556,22 @@ Concentric</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
@@ -15449,6 +15580,7 @@ Concentric</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">10</property>
+ <property name="homogeneous">True</property>
<child>
<widget class="GtkHBox"
id="hbox_encoder_anchorage_diameter">
<property name="visible">True</property>
@@ -15500,7 +15632,7 @@ Concentric</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox66">
+ <widget class="GtkHBox" id="hbox126">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">20</property>
@@ -15508,7 +15640,7 @@ Concentric</property>
<widget class="GtkHBox" id="hbox160">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">8</property>
+ <property name="spacing">12</property>
<child>
<widget class="GtkLabel" id="label183">
<property name="visible">True</property>
@@ -15523,7 +15655,6 @@ Concentric</property>
</child>
<child>
<widget class="GtkSpinButton"
id="spin_encoder_im_weights_n">
- <property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
<property
name="primary_icon_activatable">False</property>
@@ -15545,11 +15676,14 @@ Concentric</property>
</child>
<child>
<widget class="GtkHBox"
id="hbox_encoder_im_weights_n">
+ <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">4</property>
<child>
<widget class="GtkButton"
id="button_encoder_im_weights_n_minus">
<property name="label"> -1 </property>
+ <property name="width_request">40</property>
+ <property name="height_request">40</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -15571,6 +15705,7 @@ Concentric</property>
<property name="invisible_char">●</property>
<property name="width_chars">2</property>
<property name="text">0</property>
+ <property name="xalign">1</property>
<property name="shadow_type">none</property>
<property
name="invisible_char_set">True</property>
<property
name="primary_icon_activatable">False</property>
@@ -15588,6 +15723,8 @@ Concentric</property>
<child>
<widget class="GtkButton"
id="button_encoder_im_weights_n_plus">
<property name="label"> +1 </property>
+ <property name="width_request">40</property>
+ <property name="height_request">40</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -15624,7 +15761,7 @@ Concentric</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip"
translatable="yes">Inertia moment</property>
- <property name="label"
translatable="yes">IM</property>
+ <property name="label"
translatable="yes">Inertia M.</property>
</widget>
<packing>
<property name="expand">True</property>
@@ -15648,29 +15785,31 @@ Concentric</property>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
+ <property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</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="expand">False</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
@@ -15708,6 +15847,28 @@ Concentric</property>
<property name="x_options"/>
</packing>
</child>
+ <child>
+ <widget class="GtkVSeparator" id="vseparator4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVSeparator" id="vseparator5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -15727,6 +15888,7 @@ Concentric</property>
<property name="tooltip"
translatable="yes">Close</property>
<property name="relief">half</property>
<signal name="clicked"
handler="on_button_encoder_exercise_close_clicked" swapped="no"/>
+ <accelerator key="Escape" signal="clicked"/>
<child>
<widget class="GtkImage"
id="image_encoder_exercise_close">
<property name="visible">True</property>
@@ -15749,6 +15911,13 @@ Concentric</property>
</packing>
</child>
</widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </widget>
</child>
</widget>
</child>
@@ -18947,6 +19116,12 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/images/md/ic_close_red_24dp_1x.png b/images/md/ic_close_red_24dp_1x.png
new file mode 100644
index 0000000..34f2647
Binary files /dev/null and b/images/md/ic_close_red_24dp_1x.png differ
diff --git a/src/Makefile.am b/src/Makefile.am
index 1136d03..7172480 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -349,7 +349,7 @@ RESOURCES = \
../images/preferences-system.png,preferences-system.png \
../images/md/ic_home_blue_24dp_1x.png,image_home.png \
../images/md/ic_settings_blue_24dp_1x.png,image_settings.png \
- ../images/md/ic_close_blue_24dp_1x.png,image_close.png \
+ ../images/md/ic_close_red_24dp_1x.png,image_close.png \
../images/md/ic_close_blue_24dp_2x.png,image_close_big.png \
../images/md/ic_power_settings_new_blue_24dp_1x.png,image_quit.png \
../images/md/ic_gravity_1x.png,image_gravity.png \
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 628c262..7cda6d6 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -782,7 +782,7 @@ public partial class ChronoJumpWindow
image_encoder_exercise_add.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_edit.png");
image_encoder_exercise_edit.Pixbuf = pixbuf;
- pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_close_big.png");
+ pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_close.png");
image_encoder_exercise_close.Pixbuf = pixbuf;
@@ -3169,7 +3169,8 @@ public partial class ChronoJumpWindow
blankEncoderInterface();
bool changed = false;
- if(m == Constants.Menuitem_modes.POWERGRAVITATORY) {
+ if(m == Constants.Menuitem_modes.POWERGRAVITATORY)
+ {
menuitem_mode_selected_power_gravitatory.Visible = true;
//change encoderConfigurationCurrent if needed
@@ -3208,6 +3209,8 @@ public partial class ChronoJumpWindow
radiobutton_gravitatory_not_menu.Active = true;
radiobutton_dont_follow_signals = false;
}
+
+ notebook_encoder_top.Page = 0;
} else {
menuitem_mode_selected_power_inertial.Visible = true;
@@ -3245,6 +3248,8 @@ public partial class ChronoJumpWindow
radiobutton_inertial_not_menu.Active = true;
radiobutton_dont_follow_signals = false;
}
+
+ notebook_encoder_top.Page = 1;
}
encoderGuiChangesAfterEncoderConfigurationWin(true);
if(changed) {
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 15ece02..6e3db56 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -35,7 +35,6 @@ public partial class ChronoJumpWindow
{
[Widget] Gtk.HBox hbox_encoder_capture_top;
- //[Widget] Gtk.Notebook notebook_encoder_capture_extra_mass;
[Widget] Gtk.Label label_encoder_exercise_mass;
[Widget] Gtk.VBox vbox_encoder_exercise_mass;
[Widget] Gtk.Label label_encoder_exercise_inertia;
@@ -51,9 +50,18 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Entry entry_encoder_im_weights_n;
[Widget] Gtk.HBox hbox_combo_encoder_anchorage;
[Widget] Gtk.ComboBox combo_encoder_anchorage;
-
+
[Widget] Gtk.Label label_encoder_selected;
-
+
+ [Widget] Gtk.Notebook notebook_encoder_top;
+ [Widget] Gtk.Label label_encoder_top_exercise;
+ [Widget] Gtk.Label label_encoder_top_eccon;
+ [Widget] Gtk.Label label_encoder_top_laterality;
+ [Widget] Gtk.Label label_encoder_top_extra_mass;
+ [Widget] Gtk.Label label_encoder_top_1RM_percent;
+ [Widget] Gtk.Label label_encoder_top_weights;
+ [Widget] Gtk.Label label_encoder_top_im;
+
//this is Kg*cm^2 because there's limitation of Glade on 3 decimals.
//at SQL it's in Kg*cm^2 also because it's stored as int
//at graph.R is converted to Kg*m^2 ( /10000 )
@@ -123,7 +131,7 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Box hbox_combo_encoder_laterality;
[Widget] Gtk.ComboBox combo_encoder_laterality;
[Widget] Gtk.Box hbox_encoder_capture_curves_save_all_none;
-
+
[Widget] Gtk.Button button_encoder_capture_curves_all;
[Widget] Gtk.Button button_encoder_capture_curves_best;
[Widget] Gtk.Button button_encoder_capture_curves_none;
@@ -494,6 +502,7 @@ public partial class ChronoJumpWindow
encoderConfigurationCurrent.extraWeightN = (int) spin_encoder_im_weights_n.Value;
encoderConfigurationCurrent.inertiaTotal =
UtilEncoder.CalculeInertiaTotal(encoderConfigurationCurrent);
label_encoder_im_total.Text = encoderConfigurationCurrent.inertiaTotal.ToString();
+ label_encoder_top_im.Text = Catalog.GetString("Inertia M.") + ": " +
label_encoder_im_total.Text;
}
}
@@ -531,6 +540,7 @@ public partial class ChronoJumpWindow
encoderConfigurationCurrent.extraWeightN = (int) spin_encoder_im_weights_n.Value;
encoderConfigurationCurrent.inertiaTotal =
UtilEncoder.CalculeInertiaTotal(encoderConfigurationCurrent);
label_encoder_im_total.Text = encoderConfigurationCurrent.inertiaTotal.ToString();
+ label_encoder_top_im.Text = Catalog.GetString("Inertia M.") + ": " +
label_encoder_im_total.Text;
}
void on_entry_encoder_im_weights_n_changed (object o, EventArgs args)
{
@@ -540,6 +550,8 @@ public partial class ChronoJumpWindow
spin_encoder_im_weights_n.Value = Convert.ToInt32(entry_encoder_im_weights_n.Text);
else
entry_encoder_im_weights_n.Text = spin_encoder_im_weights_n.Value.ToString();
+
+ label_encoder_top_weights.Text = Catalog.GetString("Weights") + ": " +
entry_encoder_im_weights_n.Text;
}
// <---- end of spin_encoder_im_weights_n ----
@@ -724,6 +736,7 @@ public partial class ChronoJumpWindow
if(UtilGtk.ComboGetActive(combo_encoder_exercise_capture) != "") { //needed because
encoder_exercise_edit updates this combo and can be without values in the changing process
array1RMUpdate(false);
encoder_change_displaced_weight_and_1RM ();
+ label_encoder_top_exercise.Text =
UtilGtk.ComboGetActive(combo_encoder_exercise_capture);
}
}
@@ -781,6 +794,8 @@ public partial class ChronoJumpWindow
spin_encoder_extra_weight.Value = Convert.ToInt32(entry_raspberry_extra_weight.Text);
else
entry_raspberry_extra_weight.Text = spin_encoder_extra_weight.Value.ToString();
+
+ label_encoder_top_extra_mass.Text = Catalog.GetString("Extra mass") + ": " +
entry_raspberry_extra_weight.Text + " Kg";
}
void encoder_change_displaced_weight_and_1RM ()
@@ -797,6 +812,8 @@ public partial class ChronoJumpWindow
else
label_encoder_1RM_percent.Text = Util.TrimDecimals(
(100 * findMass(Constants.MassType.EXTRA) / ( load1RM * 1.0
)).ToString(), 1);
+
+ label_encoder_top_1RM_percent.Text = label_encoder_1RM_percent.Text + " %1RM";
}
// ---- end of change extra weight ----
@@ -1484,8 +1501,7 @@ public partial class ChronoJumpWindow
{
if(encoderConfigurationCurrent.has_inertia)
{
- //notebook_encoder_capture_extra_mass.CurrentPage = 1;
- //TODO: show also info on the top
+ notebook_encoder_top.Page = 1;
label_encoder_exercise_mass.Visible = false;
vbox_encoder_exercise_mass.Visible = false;
label_encoder_exercise_inertia.Visible = true;
@@ -1504,10 +1520,10 @@ public partial class ChronoJumpWindow
entry_encoder_im_weights_n.Text = encoderConfigurationCurrent.extraWeightN.ToString();
label_encoder_im_total.Text = encoderConfigurationCurrent.inertiaTotal.ToString();
+ label_encoder_top_im.Text = Catalog.GetString("Inertia M.") + ": " +
label_encoder_im_total.Text;
}
else {
- //notebook_encoder_capture_extra_mass.CurrentPage = 0
- //TODO: show also info on the top
+ notebook_encoder_top.Page = 0;
label_encoder_exercise_mass.Visible = true;
vbox_encoder_exercise_mass.Visible = true;
label_encoder_exercise_inertia.Visible = false;
@@ -3109,6 +3125,7 @@ public partial class ChronoJumpWindow
UtilGtk.ComboUpdate(combo_encoder_laterality, comboLateralityOptionsTranslated, "");
combo_encoder_laterality.Active = UtilGtk.ComboMakeActive(combo_encoder_laterality,
Catalog.GetString(comboLateralityOptions[0]));
+ combo_encoder_laterality.Changed += new EventHandler (on_combo_encoder_laterality_changed);
//create combo encoder anchorage
combo_encoder_anchorage = Gtk.ComboBox.NewText();
@@ -3174,6 +3191,14 @@ public partial class ChronoJumpWindow
hbox_combo_encoder_analyze_curve_num_combo.ShowAll();
combo_encoder_analyze_curve_num_combo.Sensitive = true;
hbox_combo_encoder_analyze_curve_num_combo.Visible = false; //do not show hbox at start
+
+ label_encoder_top_exercise.Text = UtilGtk.ComboGetActive(combo_encoder_exercise_capture);
+ label_encoder_top_eccon.Text = UtilGtk.ComboGetActive(combo_encoder_eccon);
+ label_encoder_top_laterality.Text = UtilGtk.ComboGetActive(combo_encoder_laterality);
+ label_encoder_top_extra_mass.Text = Catalog.GetString("Extra mass") + ": " +
entry_raspberry_extra_weight.Text + " Kg";
+ label_encoder_top_1RM_percent.Text = label_encoder_1RM_percent.Text + " %1RM";
+ label_encoder_top_weights.Text = Catalog.GetString("Weights") + ": " +
entry_encoder_im_weights_n.Text;
+ label_encoder_top_im.Text = Catalog.GetString("Inertia M.") + ": " +
label_encoder_im_total.Text;
}
//this is called also when an exercise is deleted to update the combo and the string []
@@ -3297,8 +3322,15 @@ public partial class ChronoJumpWindow
check_encoder_analyze_eccon_together.Sensitive = true;
block_check_encoder_analyze_eccon_together_if_needed();
+ label_encoder_top_eccon.Text = UtilGtk.ComboGetActive(combo_encoder_eccon);
}
+ void on_combo_encoder_laterality_changed (object o, EventArgs args)
+ {
+ label_encoder_top_laterality.Text = UtilGtk.ComboGetActive(combo_encoder_laterality);
+ }
+
+
void on_button_encoder_capture_curves_all_clicked (object o, EventArgs args) {
encoderCaptureSaveCurvesAllNoneBest(Constants.EncoderAutoSaveCurve.ALL,
Constants.GetEncoderVariablesCapture(preferences.encoderCaptureMainVariable));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]