[chronojump] Capture multijumps with height



commit c440406a5c6e061cf7900ca8631d140254bb3912
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Dec 11 13:48:33 2014 +0100

    Capture multijumps with height

 glade/chronojump.glade  |  275 ++++++++++++++++++++++++++++++++++-------------
 src/gui/eventExecute.cs |   32 ++++--
 2 files changed, 221 insertions(+), 86 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index 180e31a..e19e6dd 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -6336,6 +6336,9 @@ Second Chronopic to platforms.</property>
                                                         <child>
                                                           <placeholder/>
                                                         </child>
+                                                        <child>
+                                                          <placeholder/>
+                                                        </child>
                                                       </widget>
                                                       <packing>
                                                         <property name="expand">True</property>
@@ -7063,6 +7066,9 @@ Second Chronopic to platforms.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             </child>
                                                             <child>
@@ -7084,31 +7090,11 @@ Second Chronopic to platforms.</property>
                                                             <widget class="GtkTable" 
id="event_execute_table_jump_reactive">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="n_rows">4</property>
+                                                            <property name="n_rows">5</property>
                                                             <property name="n_columns">2</property>
                                                             <property name="column_spacing">4</property>
                                                             <property name="row_spacing">4</property>
                                                             <child>
-                                                            <widget class="GtkEventBox" 
id="event_execute_eventbox_jump_reactive_tc">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <child>
-                                                            <widget class="GtkLabel" id="label288">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="xalign">0</property>
-                                                            <property name="label" translatable="yes"> 
</property>
-                                                            </widget>
-                                                            </child>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="top_attach">2</property>
-                                                            <property name="bottom_attach">3</property>
-                                                            <property name="x_options">GTK_FILL</property>
-                                                            <property name="y_options"/>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
                                                             <widget class="GtkLabel" id="label290">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
@@ -7133,46 +7119,6 @@ Second Chronopic to platforms.</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkEventBox" 
id="event_execute_eventbox_jump_reactive_tf">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <child>
-                                                            <widget class="GtkLabel" id="label292">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="xalign">0</property>
-                                                            <property name="label" translatable="yes"> 
</property>
-                                                            </widget>
-                                                            </child>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="top_attach">1</property>
-                                                            <property name="bottom_attach">2</property>
-                                                            <property name="x_options">GTK_FILL</property>
-                                                            <property name="y_options"/>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
-                                                            <widget class="GtkEventBox" 
id="event_execute_eventbox_jump_reactive_tf_tc">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <child>
-                                                            <widget class="GtkLabel" id="label444">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="xalign">0</property>
-                                                            <property name="label" translatable="yes"> 
</property>
-                                                            </widget>
-                                                            </child>
-                                                            </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"/>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
                                                             <widget class="GtkHBox" id="hbox226">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
@@ -7182,7 +7128,7 @@ Second Chronopic to platforms.</property>
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="xalign">0</property>
-                                                            <property name="label" translatable="yes">TF / 
TC</property>
+                                                            <property name="label" 
translatable="yes">TC</property>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -7250,7 +7196,7 @@ Second Chronopic to platforms.</property>
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="xalign">0</property>
-                                                            <property name="label" 
translatable="yes">TC</property>
+                                                            <property name="label" 
translatable="yes">TF</property>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -7318,7 +7264,7 @@ Second Chronopic to platforms.</property>
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="xalign">0</property>
-                                                            <property name="label" 
translatable="yes">TF</property>
+                                                            <property name="label" 
translatable="yes">Height</property>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -7376,6 +7322,100 @@ Second Chronopic to platforms.</property>
                                                             <property name="y_options">GTK_FILL</property>
                                                             </packing>
                                                             </child>
+                                                            <child>
+                                                            <widget class="GtkLabel" id="label117">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="xalign">0</property>
+                                                            <property name="label" translatable="yes">TF / 
TC</property>
+                                                            </widget>
+                                                            <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>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkEventBox" 
id="event_execute_eventbox_jump_reactive_tf_tc">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <child>
+                                                            <widget class="GtkLabel" id="label444">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="xalign">0</property>
+                                                            <property name="label" translatable="yes"> 
</property>
+                                                            </widget>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="top_attach">4</property>
+                                                            <property name="bottom_attach">5</property>
+                                                            <property name="x_options">GTK_FILL</property>
+                                                            <property name="y_options"/>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkEventBox" 
id="event_execute_eventbox_jump_reactive_tc">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <child>
+                                                            <widget class="GtkLabel" id="label288">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="xalign">0</property>
+                                                            <property name="label" translatable="yes"> 
</property>
+                                                            </widget>
+                                                            </child>
+                                                            </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"/>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkEventBox" 
id="event_execute_eventbox_jump_reactive_tf">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <child>
+                                                            <widget class="GtkLabel" id="label292">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="xalign">0</property>
+                                                            <property name="label" translatable="yes"> 
</property>
+                                                            </widget>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="top_attach">2</property>
+                                                            <property name="bottom_attach">3</property>
+                                                            <property name="x_options">GTK_FILL</property>
+                                                            <property name="y_options"/>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkEventBox" 
id="event_execute_eventbox_jump_reactive_height">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <child>
+                                                            <widget class="GtkLabel" id="label118">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="xalign">0</property>
+                                                            <property name="label" translatable="yes"> 
</property>
+                                                            </widget>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="top_attach">1</property>
+                                                            <property name="bottom_attach">2</property>
+                                                            <property name="x_options">GTK_FILL</property>
+                                                            <property name="y_options"/>
+                                                            </packing>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -7387,7 +7427,7 @@ Second Chronopic to platforms.</property>
                                                             <widget class="GtkTable" 
id="event_execute_table_jump_reactive_values">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="n_rows">4</property>
+                                                            <property name="n_rows">5</property>
                                                             <property name="n_columns">2</property>
                                                             <property name="column_spacing">4</property>
                                                             <property name="row_spacing">4</property>
@@ -7428,8 +7468,8 @@ Second Chronopic to platforms.</property>
                                                             <property name="justify">center</property>
                                                             </widget>
                                                             <packing>
-                                                            <property name="top_attach">1</property>
-                                                            <property name="bottom_attach">2</property>
+                                                            <property name="top_attach">2</property>
+                                                            <property name="bottom_attach">3</property>
                                                             <property name="x_options"/>
                                                             <property name="y_options"/>
                                                             </packing>
@@ -7444,8 +7484,8 @@ Second Chronopic to platforms.</property>
                                                             <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>
+                                                            <property name="top_attach">2</property>
+                                                            <property name="bottom_attach">3</property>
                                                             <property name="x_options"/>
                                                             <property name="y_options"/>
                                                             </packing>
@@ -7460,8 +7500,8 @@ Second Chronopic to platforms.</property>
                                                             <packing>
                                                             <property name="left_attach">1</property>
                                                             <property name="right_attach">2</property>
-                                                            <property name="top_attach">2</property>
-                                                            <property name="bottom_attach">3</property>
+                                                            <property name="top_attach">3</property>
+                                                            <property name="bottom_attach">4</property>
                                                             <property name="x_options"/>
                                                             <property name="y_options"/>
                                                             </packing>
@@ -7474,8 +7514,8 @@ Second Chronopic to platforms.</property>
                                                             <property name="justify">center</property>
                                                             </widget>
                                                             <packing>
-                                                            <property name="top_attach">2</property>
-                                                            <property name="bottom_attach">3</property>
+                                                            <property name="top_attach">3</property>
+                                                            <property name="bottom_attach">4</property>
                                                             <property name="x_options"/>
                                                             <property name="y_options"/>
                                                             </packing>
@@ -7488,8 +7528,8 @@ Second Chronopic to platforms.</property>
                                                             <property name="justify">center</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"/>
                                                             <property name="y_options"/>
                                                             </packing>
@@ -7504,8 +7544,38 @@ Second Chronopic to platforms.</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="x_options"/>
+                                                            <property name="y_options"/>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkLabel" 
id="event_execute_label_jump_reactive_height_now">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="xalign">0</property>
+                                                            <property name="justify">center</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="top_attach">1</property>
+                                                            <property name="bottom_attach">2</property>
+                                                            <property name="x_options"/>
+                                                            <property name="y_options"/>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkLabel" 
id="event_execute_label_jump_reactive_height_avg">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="xalign">0</property>
+                                                            <property name="justify">center</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>
                                                             <property name="x_options"/>
                                                             <property name="y_options"/>
                                                             </packing>
@@ -7924,6 +7994,9 @@ Second Chronopic to platforms.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="position">2</property>
@@ -8544,6 +8617,9 @@ Second Chronopic to platforms.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="position">4</property>
@@ -18296,6 +18372,9 @@ by you</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -18824,6 +18903,9 @@ by you</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -19844,6 +19926,9 @@ by you</property>
               <placeholder/>
             </child>
             <child>
+              <placeholder/>
+            </child>
+            <child>
               <widget class="GtkButton" id="button_video_url">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -19921,6 +20006,9 @@ by you</property>
             <child>
               <placeholder/>
             </child>
+            <child>
+              <placeholder/>
+            </child>
           </widget>
           <packing>
             <property name="expand">True</property>
@@ -28777,6 +28865,24 @@ options</property>
                             <child>
                               <placeholder/>
                             </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
                           </widget>
                         </child>
                       </widget>
@@ -30685,6 +30791,9 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                                 <child>
                                   <placeholder/>
                                 </child>
+                                <child>
+                                  <placeholder/>
+                                </child>
                               </widget>
                             </child>
                           </widget>
@@ -31251,6 +31360,9 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -33811,6 +33923,9 @@ show elevation as:</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                       <packing>
                         <property name="left_attach">2</property>
@@ -34003,6 +34118,9 @@ show elevation as:</property>
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
@@ -34210,6 +34328,9 @@ show elevation as:</property>
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
diff --git a/src/gui/eventExecute.cs b/src/gui/eventExecute.cs
index 38746c2..78a9a0f 100644
--- a/src/gui/eventExecute.cs
+++ b/src/gui/eventExecute.cs
@@ -104,10 +104,12 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.Label event_execute_label_jump_simple_height_person;
        [Widget] Gtk.Label event_execute_label_jump_simple_height_session;
 
-       [Widget] Gtk.Label event_execute_label_jump_reactive_tc_now;
-       [Widget] Gtk.Label event_execute_label_jump_reactive_tc_avg;
+       [Widget] Gtk.Label event_execute_label_jump_reactive_height_now;
+       [Widget] Gtk.Label event_execute_label_jump_reactive_height_avg;
        [Widget] Gtk.Label event_execute_label_jump_reactive_tf_now;
        [Widget] Gtk.Label event_execute_label_jump_reactive_tf_avg;
+       [Widget] Gtk.Label event_execute_label_jump_reactive_tc_now;
+       [Widget] Gtk.Label event_execute_label_jump_reactive_tc_avg;
        [Widget] Gtk.Label event_execute_label_jump_reactive_tf_tc_now;
        [Widget] Gtk.Label event_execute_label_jump_reactive_tf_tc_avg;
 
@@ -375,10 +377,12 @@ public partial class ChronoJumpWindow
                event_execute_table_jump_reactive_values.Show();
 
                //initializeLabels
-               event_execute_label_jump_reactive_tc_now.Text = "";
-               event_execute_label_jump_reactive_tc_avg.Text = "";
+               event_execute_label_jump_reactive_height_now.Text = "";
+               event_execute_label_jump_reactive_height_avg.Text = "";
                event_execute_label_jump_reactive_tf_now.Text = "";
                event_execute_label_jump_reactive_tf_avg.Text = "";
+               event_execute_label_jump_reactive_tc_now.Text = "";
+               event_execute_label_jump_reactive_tc_avg.Text = "";
                event_execute_label_jump_reactive_tf_tc_now.Text = "";
                event_execute_label_jump_reactive_tf_tc_avg.Text = "";
 
@@ -1374,15 +1378,25 @@ Log.WriteLine("Preparing reactive A");
                 * these Log.writeLines are useful to don't "get the thread dead"
                 * without them , sometimes drawingarea is not painted
                 */
-               event_execute_label_jump_reactive_tc_now.Text = "<b>" + Util.TrimDecimals(lastTc.ToString(), 
preferences.digitsNumber) + "</b>";
-               event_execute_label_jump_reactive_tc_now.UseMarkup = true; 
-               
-               event_execute_label_jump_reactive_tc_avg.Text = Util.TrimDecimals(avgTC.ToString(), 
preferences.digitsNumber);
 
+               //height
+               event_execute_label_jump_reactive_height_now.Text = "<b>" + Util.TrimDecimals(
+                               Util.GetHeightInCentimeters(lastTv.ToString()), preferences.digitsNumber) + 
"</b>";
+               event_execute_label_jump_reactive_height_now.UseMarkup = true; 
+               event_execute_label_jump_reactive_height_avg.Text = Util.TrimDecimals(
+                               Util.GetHeightInCentimeters(avgTV.ToString()), preferences.digitsNumber);
+               
+               //TV
                event_execute_label_jump_reactive_tf_now.Text = "<b>" + Util.TrimDecimals(lastTv.ToString(), 
preferences.digitsNumber) + "</b>";
                event_execute_label_jump_reactive_tf_now.UseMarkup = true; 
-               
                event_execute_label_jump_reactive_tf_avg.Text = Util.TrimDecimals(avgTV.ToString(), 
preferences.digitsNumber);
+               
+               //TC
+               event_execute_label_jump_reactive_tc_now.Text = "<b>" + Util.TrimDecimals(lastTc.ToString(), 
preferences.digitsNumber) + "</b>";
+               event_execute_label_jump_reactive_tc_now.UseMarkup = true; 
+               event_execute_label_jump_reactive_tc_avg.Text = Util.TrimDecimals(avgTC.ToString(), 
preferences.digitsNumber);
+
+               //TV / TC
                if(lastTc > 0) {
                        event_execute_label_jump_reactive_tf_tc_now.Text = "<b>" + 
Util.TrimDecimals((lastTv/lastTc).ToString(), preferences.digitsNumber) + "</b>";
                        event_execute_label_jump_reactive_tf_tc_now.UseMarkup = true; 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]