[chronojump] gui: runs done



commit ee262f1b25897a81f97b1ed3f62a3be1bbfb1362
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Mar 24 15:55:18 2011 +0100

    gui: runs done

 glade/chronojump.glade  |  849 +++++++++++++----------------------------------
 src/gui/chronojump.cs   |  327 ++++++-------------
 src/gui/eventExecute.cs |   15 +
 src/gui/jump.cs         |   50 +--
 src/gui/run.cs          |  372 ++++++++++++++++-----
 src/runType.cs          |    2 +-
 6 files changed, 662 insertions(+), 953 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index f7af36f..fd9f306 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -4784,164 +4784,7 @@ options</property>
     <property name="type_hint">dialog</property>
     <signal name="delete_event" handler="on_run_extra_delete_event"/>
     <child>
-      <widget class="GtkVBox" id="vbox42">
-        <property name="visible">True</property>
-        <child>
-          <widget class="GtkLabel" id="label106">
-            <property name="visible">True</property>
-            <property name="label" translatable="yes">Extra data for this run</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkTable" id="table14">
-            <property name="visible">True</property>
-            <property name="n_rows">2</property>
-            <property name="n_columns">3</property>
-            <property name="column_spacing">4</property>
-            <property name="row_spacing">4</property>
-            <child>
-              <widget class="GtkLabel" id="label_limit">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Limited by</property>
-              </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"></property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label_limit_units">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-              </widget>
-              <packing>
-                <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>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkSpinButton" id="spinbutton_limit">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="adjustment">100 0 100000 1 10 0</property>
-                <property name="snap_to_ticks">True</property>
-                <property name="numeric">True</property>
-                <property name="update_policy">if-valid</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">GTK_EXPAND</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label_distance">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Track distance 
-(between platforms)</property>
-              </widget>
-              <packing>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label_distance_units">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">meters</property>
-              </widget>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="right_attach">3</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkSpinButton" id="spinbutton_distance">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="adjustment">100 0 10000 1 10 0</property>
-                <property name="snap_to_ticks">True</property>
-                <property name="numeric">True</property>
-                <property name="update_policy">if-valid</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="x_options"></property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="padding">8</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkHButtonBox" id="hbuttonbox19">
-            <property name="visible">True</property>
-            <property name="layout_style">spread</property>
-            <child>
-              <widget class="GtkButton" id="button_cancel">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-                <signal name="clicked" handler="on_button_cancel_clicked"/>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="button_accept">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-                <signal name="clicked" handler="on_button_accept_clicked"/>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="padding">10</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-      </widget>
+      <placeholder/>
     </child>
   </widget>
   <widget class="GtkWindow" id="run_type_add">
@@ -15113,363 +14956,43 @@ by you</property>
               </widget>
             </child>
             <child>
-              <widget class="GtkMenuItem" id="menu_runs">
+              <widget class="GtkMenuItem" id="menu_other">
                 <property name="visible">True</property>
-                <property name="label" translatable="yes">_Run</property>
+                <property name="label" translatable="yes">_Other tests</property>
                 <property name="use_underline">True</property>
                 <child>
-                  <widget class="GtkMenu" id="menu_runs_menu">
+                  <widget class="GtkMenu" id="menu_other_menu">
                     <child>
-                      <widget class="GtkMenuItem" id="menu_execute_simple_runs1">
+                      <widget class="GtkMenuItem" id="menuitem_reaction_time">
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes">Execute simple run</property>
+                        <property name="label" translatable="yes">Reaction time</property>
                         <property name="use_underline">True</property>
-                        <child>
-                          <widget class="GtkMenu" id="execute_simple_runs1_menu">
-                            <child>
-                              <widget class="GtkMenuItem" id="menuitem_run_custom">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">_Custom</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_run_extra_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="menuitem_20m">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">20m</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_normal_run_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="menuitem_100m">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">100m</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_normal_run_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="menuitem_200m">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">200m</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_normal_run_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="menuitem_400m">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">400m</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_normal_run_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkSeparatorMenuItem" id="separador14">
-                                <property name="visible">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="menuitem_run_gesell">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Gesell Dynamic balance test</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_normal_run_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="menuitem_run_20yard">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">20 Yard</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_normal_run_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="menuitem_run_505">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">505</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_normal_run_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="menuitem_run_illinois">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Illinois</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_normal_run_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="menuitem_run_margaria">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Margaria</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_run_extra_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="menuitem_run_shuttle">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Shuttle run</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_normal_run_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="menuitem_run_zigzag">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">ZigZag</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_normal_run_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkSeparatorMenuItem" id="separador15">
-                                <property name="visible">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkImageMenuItem" id="more_simple_runs">
-                                <property name="label" translatable="yes">More simple runs</property>
-                                <property name="visible">True</property>
-                                <property name="use_stock">False</property>
-                                <signal name="activate" handler="on_button_run_more_clicked"/>
-                                <child internal-child="image">
-                                  <widget class="GtkImage" id="image28">
-                                    <property name="visible">True</property>
-                                    <property name="stock">gtk-add</property>
-                                  </widget>
-                                </child>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
+                        <signal name="activate" handler="on_reaction_time_activate"/>
                       </widget>
                     </child>
                     <child>
-                      <widget class="GtkImageMenuItem" id="menuitem_edit_selected_run">
-                        <property name="label" translatable="yes">Edit selected run</property>
+                      <widget class="GtkSeparatorMenuItem" id="separador16">
                         <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_edit_selected_run_clicked"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="image30">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-edit</property>
-                          </widget>
-                        </child>
                       </widget>
                     </child>
                     <child>
-                      <widget class="GtkImageMenuItem" id="menuitem_delete_selected_run">
-                        <property name="label" translatable="yes">Delete selected run</property>
+                      <widget class="GtkMenuItem" id="menuitem_pulse_free">
                         <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_delete_selected_run_clicked"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="image31">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-delete</property>
-                          </widget>
-                        </child>
+                        <property name="label" translatable="yes">Free pulse</property>
+                        <property name="use_underline">True</property>
+                        <signal name="activate" handler="on_button_pulse_free_activate"/>
                       </widget>
                     </child>
                     <child>
-                      <widget class="GtkSeparatorMenuItem" id="separador10">
+                      <widget class="GtkMenuItem" id="menuitem_pulse_custom">
                         <property name="visible">True</property>
+                        <property name="label" translatable="yes">Custom pulse</property>
+                        <property name="use_underline">True</property>
+                        <signal name="activate" handler="on_button_pulse_custom_activate"/>
                       </widget>
                     </child>
                     <child>
-                      <widget class="GtkMenuItem" id="menu_execute_intervallic_runs1">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">Execute intervallic runs</property>
-                        <property name="use_underline">True</property>
-                        <child>
-                          <widget class="GtkMenu" id="execute_intervalic_runs1_menu">
-                            <child>
-                              <widget class="GtkMenuItem" id="menuitem_run_interval_by_laps">
-                                <property name="visible">True</property>
-                                <property name="tooltip" translatable="yes">Intervallic run limited by Laps</property>
-                                <property name="label" translatable="yes">By laps</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_run_interval_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="menuitem_run_interval_by_time">
-                                <property name="visible">True</property>
-                                <property name="tooltip" translatable="yes">Intervallic run limited by Time</property>
-                                <property name="label" translatable="yes">By time</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_run_interval_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="menuitem_run_interval_unlimited">
-                                <property name="visible">True</property>
-                                <property name="tooltip" translatable="yes">Intervallic run unlimited (until "finish" button is clicked)</property>
-                                <property name="label" translatable="yes">Unlimited</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_run_interval_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="menu_run_interval_mtgug">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">MTGUG</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_run_interval_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkSeparatorMenuItem" id="separador19">
-                                <property name="visible">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkImageMenuItem" id="more_interval_runs">
-                                <property name="label" translatable="yes">More intervallic runs</property>
-                                <property name="visible">True</property>
-                                <property name="use_stock">False</property>
-                                <signal name="activate" handler="on_button_run_interval_more_clicked"/>
-                                <child internal-child="image">
-                                  <widget class="GtkImage" id="image29">
-                                    <property name="visible">True</property>
-                                    <property name="stock">gtk-add</property>
-                                  </widget>
-                                </child>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="menuitem_edit_selected_run_interval">
-                        <property name="label" translatable="yes">Edit selected intervallic run</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_edit_selected_run_interval_clicked"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="image32">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-edit</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="menuitem_repair_selected_run_interval">
-                        <property name="label" translatable="yes">Repair selected intervallic run</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_repair_selected_run_interval_clicked"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="image33">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-missing-image</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="menuitem_delete_selected_run_interval">
-                        <property name="label" translatable="yes">Delete selected intervallic run</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_delete_selected_run_interval_clicked"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="image34">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-delete</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkSeparatorMenuItem" id="separator1">
-                        <property name="visible">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="menuitem_run_type_add">
-                        <property name="label" translatable="yes">Add run type</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_run_type_add_activate"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="image6">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-new</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkSeparatorMenuItem" id="separador1">
-                        <property name="visible">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="menuitem_run_type_delete_intervallic">
-                        <property name="label" translatable="yes">Delete intervallic run type</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_run_type_delete_intervallic_activate"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="image3">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-delete</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="menu_other">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_Other tests</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="menu_other_menu">
-                    <child>
-                      <widget class="GtkMenuItem" id="menuitem_reaction_time">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">Reaction time</property>
-                        <property name="use_underline">True</property>
-                        <signal name="activate" handler="on_reaction_time_activate"/>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkSeparatorMenuItem" id="separador16">
-                        <property name="visible">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkMenuItem" id="menuitem_pulse_free">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">Free pulse</property>
-                        <property name="use_underline">True</property>
-                        <signal name="activate" handler="on_button_pulse_free_activate"/>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkMenuItem" id="menuitem_pulse_custom">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">Custom pulse</property>
-                        <property name="use_underline">True</property>
-                        <signal name="activate" handler="on_button_pulse_custom_activate"/>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkSeparatorMenuItem" id="separador22">
+                      <widget class="GtkSeparatorMenuItem" id="separador22">
                         <property name="visible">True</property>
                       </widget>
                     </child>
@@ -15850,12 +15373,6 @@ by you</property>
                                         <property name="position">3</property>
                                       </packing>
                                     </child>
-                                    <child>
-                                      <placeholder/>
-                                    </child>
-                                    <child>
-                                      <placeholder/>
-                                    </child>
                                   </widget>
                                   <packing>
                                     <property name="expand">False</property>
@@ -15916,6 +15433,8 @@ by you</property>
                                                         <property name="can_focus">True</property>
                                                         <property name="can_default">True</property>
                                                         <property name="receives_default">True</property>
+                                                        <property name="tooltip" translatable="yes">Select previous person
+&lt;Control&gt;Up</property>
                                                         <property name="relief">half</property>
                                                         <signal name="clicked" handler="on_treeview_persons_up"/>
                                                         <accelerator key="Up" signal="clicked" modifiers="GDK_CONTROL_MASK"/>
@@ -15939,6 +15458,8 @@ by you</property>
                                                         <property name="can_focus">True</property>
                                                         <property name="can_default">True</property>
                                                         <property name="receives_default">True</property>
+                                                        <property name="tooltip" translatable="yes">Select next person
+&lt;Control&gt;Down</property>
                                                         <property name="relief">half</property>
                                                         <signal name="clicked" handler="on_treeview_persons_down"/>
                                                         <accelerator key="Down" signal="clicked" modifiers="GDK_CONTROL_MASK"/>
@@ -16426,6 +15947,7 @@ Chronopic</property>
                               <widget class="GtkNotebook" id="notebook_execute">
                                 <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="GtkFrame" id="frame2">
@@ -17629,42 +17151,6 @@ Chronopic</property>
                                             <property name="n_rows">2</property>
                                             <property name="n_columns">2</property>
                                             <child>
-                                              <widget class="GtkButton" id="button_run_interval_more">
-                                                <property name="visible">True</property>
-                                                <property name="can_focus">True</property>
-                                                <property name="receives_default">True</property>
-                                                <property name="has_tooltip">True</property>
-                                                <property name="tooltip" translatable="yes">More intervallic runs</property>
-                                                <signal name="clicked" handler="on_button_run_interval_more_clicked"/>
-                                                <child>
-                                                  <widget class="GtkImage" id="image3173">
-                                                    <property name="visible">True</property>
-                                                    <property name="stock">gtk-add</property>
-                                                  </widget>
-                                                </child>
-                                              </widget>
-                                            </child>
-                                            <child>
-                                              <widget class="GtkButton" id="button_run_interval_last">
-                                                <property name="visible">True</property>
-                                                <property name="can_focus">True</property>
-                                                <property name="receives_default">True</property>
-                                                <property name="has_tooltip">True</property>
-                                                <property name="tooltip" translatable="yes">Repeat last</property>
-                                                <signal name="clicked" handler="on_button_run_interval_last_clicked"/>
-                                                <child>
-                                                  <widget class="GtkImage" id="image3174">
-                                                    <property name="visible">True</property>
-                                                    <property name="stock">gtk-redo</property>
-                                                  </widget>
-                                                </child>
-                                              </widget>
-                                              <packing>
-                                                <property name="top_attach">1</property>
-                                                <property name="bottom_attach">2</property>
-                                              </packing>
-                                            </child>
-                                            <child>
                                               <widget class="GtkButton" id="button23">
                                                 <property name="visible">True</property>
                                                 <property name="can_focus">True</property>
@@ -17732,6 +17218,12 @@ Chronopic</property>
                                                 <property name="right_attach">2</property>
                                               </packing>
                                             </child>
+                                            <child>
+                                              <placeholder/>
+                                            </child>
+                                            <child>
+                                              <placeholder/>
+                                            </child>
                                           </widget>
                                         </child>
                                       </widget>
@@ -18502,9 +17994,76 @@ weight</property>
                                                   </packing>
                                                 </child>
                                                 <child>
-                                                  <widget class="GtkLabel" id="label27">
+                                                  <widget class="GtkVBox" id="vbox42">
                                                     <property name="visible">True</property>
-                                                    <property name="label">c</property>
+                                                    <child>
+                                                      <widget class="GtkLabel" id="extra_window_label_runs_no_options">
+                                                        <property name="visible">True</property>
+                                                        <property name="label" translatable="yes">No options</property>
+                                                      </widget>
+                                                      <packing>
+                                                        <property name="position">0</property>
+                                                      </packing>
+                                                    </child>
+                                                    <child>
+                                                      <widget class="GtkTable" id="table14">
+                                                        <property name="visible">True</property>
+                                                        <property name="n_rows">2</property>
+                                                        <property name="n_columns">2</property>
+                                                        <property name="column_spacing">6</property>
+                                                        <property name="row_spacing">6</property>
+                                                        <child>
+                                                          <widget class="GtkLabel" id="extra_window_runs_label_distance">
+                                                            <property name="visible">True</property>
+                                                            <property name="xalign">0</property>
+                                                          </widget>
+                                                          <packing>
+                                                            <property name="x_options">GTK_FILL</property>
+                                                            <property name="y_options"></property>
+                                                          </packing>
+                                                        </child>
+                                                        <child>
+                                                          <widget class="GtkSpinButton" id="extra_window_runs_spinbutton_distance">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="invisible_char">â??</property>
+                                                            <property name="adjustment">100 0 10000 0.10000000000000001 10 0</property>
+                                                            <property name="digits">1</property>
+                                                            <property name="snap_to_ticks">True</property>
+                                                            <property name="numeric">True</property>
+                                                            <property name="update_policy">if-valid</property>
+                                                          </widget>
+                                                          <packing>
+                                                            <property name="left_attach">1</property>
+                                                            <property name="right_attach">2</property>
+                                                            <property name="x_options"></property>
+                                                            <property name="y_options"></property>
+                                                          </packing>
+                                                        </child>
+                                                        <child>
+                                                          <widget class="GtkLabel" id="extra_window_runs_label_distance_units">
+                                                            <property name="visible">True</property>
+                                                            <property name="xalign">0</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">GTK_FILL</property>
+                                                            <property name="y_options"></property>
+                                                          </packing>
+                                                        </child>
+                                                        <child>
+                                                          <placeholder/>
+                                                        </child>
+                                                      </widget>
+                                                      <packing>
+                                                        <property name="expand">False</property>
+                                                        <property name="padding">8</property>
+                                                        <property name="position">1</property>
+                                                      </packing>
+                                                    </child>
                                                   </widget>
                                                   <packing>
                                                     <property name="position">2</property>
@@ -18522,9 +18081,128 @@ weight</property>
                                                   </packing>
                                                 </child>
                                                 <child>
-                                                  <widget class="GtkLabel" id="label28">
+                                                  <widget class="GtkVBox" id="vbox31">
                                                     <property name="visible">True</property>
-                                                    <property name="label">c</property>
+                                                    <child>
+                                                      <widget class="GtkLabel" id="extra_window_label_runs_interval_no_options">
+                                                        <property name="visible">True</property>
+                                                        <property name="label" translatable="yes">No options</property>
+                                                      </widget>
+                                                      <packing>
+                                                        <property name="position">0</property>
+                                                      </packing>
+                                                    </child>
+                                                    <child>
+                                                      <widget class="GtkTable" id="table6">
+                                                        <property name="visible">True</property>
+                                                        <property name="n_rows">4</property>
+                                                        <property name="n_columns">2</property>
+                                                        <property name="column_spacing">6</property>
+                                                        <property name="row_spacing">6</property>
+                                                        <child>
+                                                          <widget class="GtkLabel" id="extra_window_runs_interval_label_limit">
+                                                            <property name="visible">True</property>
+                                                            <property name="xalign">0</property>
+                                                            <property name="label" translatable="yes">Limited by</property>
+                                                          </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"></property>
+                                                          </packing>
+                                                        </child>
+                                                        <child>
+                                                          <widget class="GtkSpinButton" id="extra_window_runs_interval_spinbutton_limit">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="invisible_char">â??</property>
+                                                            <property name="adjustment">100 0 100000 1 10 0</property>
+                                                            <property name="snap_to_ticks">True</property>
+                                                            <property name="numeric">True</property>
+                                                            <property name="update_policy">if-valid</property>
+                                                          </widget>
+                                                          <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="x_options"></property>
+                                                            <property name="y_options"></property>
+                                                          </packing>
+                                                        </child>
+                                                        <child>
+                                                          <widget class="GtkLabel" id="extra_window_runs_interval_label_distance">
+                                                            <property name="visible">True</property>
+                                                            <property name="xalign">0</property>
+                                                            <property name="label" translatable="yes">Track distance 
+(between platforms)</property>
+                                                          </widget>
+                                                          <packing>
+                                                            <property name="x_options">GTK_FILL</property>
+                                                            <property name="y_options"></property>
+                                                          </packing>
+                                                        </child>
+                                                        <child>
+                                                          <widget class="GtkSpinButton" id="extra_window_runs_interval_spinbutton_distance">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="invisible_char">â??</property>
+                                                            <property name="adjustment">100 0 10000 0.10000000000000001 10 0</property>
+                                                            <property name="digits">1</property>
+                                                            <property name="snap_to_ticks">True</property>
+                                                            <property name="numeric">True</property>
+                                                            <property name="update_policy">if-valid</property>
+                                                          </widget>
+                                                          <packing>
+                                                            <property name="left_attach">1</property>
+                                                            <property name="right_attach">2</property>
+                                                            <property name="x_options"></property>
+                                                            <property name="y_options"></property>
+                                                          </packing>
+                                                        </child>
+                                                        <child>
+                                                          <widget class="GtkLabel" id="extra_window_runs_interval_label_distance_units">
+                                                            <property name="visible">True</property>
+                                                            <property name="xalign">0</property>
+                                                            <property name="label" translatable="yes">meters</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">GTK_FILL</property>
+                                                            <property name="y_options"></property>
+                                                          </packing>
+                                                        </child>
+                                                        <child>
+                                                          <widget class="GtkLabel" id="extra_window_runs_interval_label_limit_units">
+                                                            <property name="visible">True</property>
+                                                            <property name="xalign">0</property>
+                                                          </widget>
+                                                          <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="x_options">GTK_FILL</property>
+                                                            <property name="y_options"></property>
+                                                          </packing>
+                                                        </child>
+                                                        <child>
+                                                          <placeholder/>
+                                                        </child>
+                                                        <child>
+                                                          <placeholder/>
+                                                        </child>
+                                                      </widget>
+                                                      <packing>
+                                                        <property name="expand">False</property>
+                                                        <property name="padding">8</property>
+                                                        <property name="position">1</property>
+                                                      </packing>
+                                                    </child>
                                                   </widget>
                                                   <packing>
                                                     <property name="position">3</property>
@@ -19114,9 +18792,11 @@ weight</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkHButtonBox" id="hbuttonbox3">
+                                                            <widget class="GtkAlignment" id="alignment10">
+                                                            <property name="visible">True</property>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox37">
                                                             <property name="visible">True</property>
-                                                            <property name="layout_style">end</property>
                                                             <child>
                                                             <widget class="GtkButton" id="event_execute_button_properties">
                                                             <property name="visible">True</property>
@@ -19135,7 +18815,8 @@ weight</property>
                                                             <packing>
                                                             <property name="expand">False</property>
                                                             <property name="fill">False</property>
-                                                            <property name="position">0</property>
+                                                            <property name="pack_type">end</property>
+                                                            <property name="position">1</property>
                                                             </packing>
                                                             </child>
                                                             <child>
@@ -19156,12 +18837,16 @@ weight</property>
                                                             <packing>
                                                             <property name="expand">False</property>
                                                             <property name="fill">False</property>
-                                                            <property name="position">1</property>
+                                                            <property name="pack_type">end</property>
+                                                            <property name="position">0</property>
                                                             </packing>
                                                             </child>
                                                             </widget>
+                                                            </child>
+                                                            </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
+                                                            <property name="pack_type">end</property>
                                                             <property name="position">1</property>
                                                             </packing>
                                                             </child>
@@ -20719,23 +20404,6 @@ weight</property>
                                     <property name="column_spacing">2</property>
                                     <property name="row_spacing">4</property>
                                     <child>
-                                      <widget class="GtkButton" id="button_run_custom">
-                                        <property name="label" translatable="yes">Custom</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="has_tooltip">True</property>
-                                        <property name="tooltip" translatable="yes">Variable distance running</property>
-                                        <property name="use_underline">True</property>
-                                        <signal name="clicked" handler="on_run_extra_activate"/>
-                                        <signal name="enter" handler="on_button_enter"/>
-                                      </widget>
-                                      <packing>
-                                        <property name="x_options">GTK_FILL</property>
-                                        <property name="y_options"></property>
-                                      </packing>
-                                    </child>
-                                    <child>
                                       <widget class="GtkButton" id="button_run_20yard">
                                         <property name="label" translatable="yes">20 Yard</property>
                                         <property name="visible">True</property>
@@ -20915,27 +20583,6 @@ weight</property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkButton" id="button_run_margaria">
-                                        <property name="label">Margaria</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="has_tooltip">True</property>
-                                        <property name="tooltip">Margaria-Kalamen test</property>
-                                        <property name="use_underline">True</property>
-                                        <signal name="clicked" handler="on_run_extra_activate"/>
-                                        <signal name="enter" handler="on_button_enter"/>
-                                      </widget>
-                                      <packing>
-                                        <property name="left_attach">3</property>
-                                        <property name="right_attach">4</property>
-                                        <property name="top_attach">1</property>
-                                        <property name="bottom_attach">2</property>
-                                        <property name="x_options">GTK_FILL</property>
-                                        <property name="y_options"></property>
-                                      </packing>
-                                    </child>
-                                    <child>
                                       <widget class="GtkHBox" id="hbox350">
                                         <property name="visible">True</property>
                                         <child>
@@ -20943,21 +20590,7 @@ weight</property>
                                             <property name="visible">True</property>
                                             <property name="left_padding">12</property>
                                             <child>
-                                              <widget class="GtkButton" id="button_run_last">
-                                                <property name="visible">True</property>
-                                                <property name="can_focus">True</property>
-                                                <property name="receives_default">True</property>
-                                                <property name="has_tooltip">True</property>
-                                                <property name="tooltip" translatable="yes">Repeat last</property>
-                                                <signal name="clicked" handler="on_button_run_last_clicked"/>
-                                                <child>
-                                                  <widget class="GtkImage" id="image3172">
-                                                    <property name="visible">True</property>
-                                                    <property name="stock">gtk-redo</property>
-                                                    <property name="icon-size">1</property>
-                                                  </widget>
-                                                </child>
-                                              </widget>
+                                              <placeholder/>
                                             </child>
                                           </widget>
                                           <packing>
@@ -21002,21 +20635,7 @@ weight</property>
                                         <property name="visible">True</property>
                                         <property name="left_padding">12</property>
                                         <child>
-                                          <widget class="GtkButton" id="button_run_more">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="has_tooltip">True</property>
-                                            <property name="tooltip" translatable="yes">More simple runs</property>
-                                            <signal name="clicked" handler="on_button_run_more_clicked"/>
-                                            <child>
-                                              <widget class="GtkImage" id="image3171">
-                                                <property name="visible">True</property>
-                                                <property name="stock">gtk-add</property>
-                                                <property name="icon-size">1</property>
-                                              </widget>
-                                            </child>
-                                          </widget>
+                                          <placeholder/>
                                         </child>
                                       </widget>
                                       <packing>
@@ -21026,6 +20645,12 @@ weight</property>
                                         <property name="y_options"></property>
                                       </packing>
                                     </child>
+                                    <child>
+                                      <placeholder/>
+                                    </child>
+                                    <child>
+                                      <placeholder/>
+                                    </child>
                                   </widget>
                                   <packing>
                                     <property name="expand">False</property>
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index b133361..231809a 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -90,7 +90,6 @@ public partial class ChronoJumpWindow
 	[Widget] Gtk.ComboBox combo_pulses;
 
 	//menus
-	[Widget] Gtk.MenuItem menu_runs;
 	[Widget] Gtk.MenuItem menu_other;
 	[Widget] Gtk.MenuItem menu_tools;
 
@@ -118,14 +117,7 @@ public partial class ChronoJumpWindow
 	
 	//runs
 	[Widget] Gtk.MenuItem menu_execute_simple_runs1;
-	[Widget] Gtk.MenuItem menuitem_edit_selected_run;
-	[Widget] Gtk.MenuItem menuitem_delete_selected_run;
 	[Widget] Gtk.MenuItem menu_execute_intervallic_runs1;
-	[Widget] Gtk.MenuItem menuitem_edit_selected_run_interval;
-	[Widget] Gtk.MenuItem menuitem_repair_selected_run_interval;
-	[Widget] Gtk.MenuItem menuitem_delete_selected_run_interval;
-	[Widget] Gtk.MenuItem menuitem_run_type_add;
-	[Widget] Gtk.MenuItem menuitem_run_type_delete_intervallic;
 	[Widget] Gtk.Button button_edit_selected_run;
 	[Widget] Gtk.Button button_video_play_selected_run;
 	[Widget] Gtk.Button button_delete_selected_run;
@@ -134,22 +126,6 @@ public partial class ChronoJumpWindow
 	[Widget] Gtk.Button button_delete_selected_run_interval;
 	[Widget] Gtk.Button button_repair_selected_run_interval;
 
-	[Widget] Gtk.MenuItem menuitem_run_custom;
-	[Widget] Gtk.MenuItem menuitem_20m;
-	[Widget] Gtk.MenuItem menuitem_100m;
-	[Widget] Gtk.MenuItem menuitem_200m;
-	[Widget] Gtk.MenuItem menuitem_400m;
-	[Widget] Gtk.MenuItem menuitem_run_gesell;
-	[Widget] Gtk.MenuItem menuitem_run_20yard;
-	[Widget] Gtk.MenuItem menuitem_run_505;
-	[Widget] Gtk.MenuItem menuitem_run_illinois;
-	[Widget] Gtk.MenuItem menuitem_run_margaria;
-	[Widget] Gtk.MenuItem menuitem_run_shuttle;
-	[Widget] Gtk.MenuItem menuitem_run_zigzag;
-	[Widget] Gtk.MenuItem menuitem_run_interval_by_laps;
-	[Widget] Gtk.MenuItem menuitem_run_interval_by_time;
-	[Widget] Gtk.MenuItem menuitem_run_interval_unlimited;
-	[Widget] Gtk.MenuItem menuitem_run_interval_mtgug;
 
 	//other
 	//reaction time
@@ -228,9 +204,6 @@ public partial class ChronoJumpWindow
 	//[Widget] Gtk.Button button_pulse_more;
 
 	
-	[Widget] Gtk.Button button_run_last;
-	[Widget] Gtk.Button button_run_interval_last;
-
 	[Widget] Gtk.Notebook notebook_execute;
 	[Widget] Gtk.Notebook notebook_results;
 	[Widget] Gtk.Notebook notebook_options;
@@ -333,6 +306,8 @@ public partial class ChronoJumpWindow
 	bool lastJumpIsSimple;	//needed on update
 	private static RunType currentRunType;
 	private static RunType currentRunIntervalType;
+	bool thisRunIsSimple;	//needed on updating
+	bool lastRunIsSimple;	//needed on update
 	private static PulseType currentPulseType;
 	private static MultiChronopicType currentMultiChronopicType;
 	private static Report report;
@@ -353,7 +328,7 @@ public partial class ChronoJumpWindow
 	RepairJumpRjWindow repairJumpRjWin;
 	JumpTypeAddWindow jumpTypeAddWin;
 	
-	RunExtraWindow runExtraWin; //for normal and intervaled runs 
+	//RunExtraWindow runExtraWin; //for normal and intervaled runs 
 	RunsMoreWindow runsMoreWin;
 	RunsIntervalMoreWindow runsIntervalMoreWin;
 	RunTypeAddWindow runTypeAddWin;
@@ -482,6 +457,8 @@ public partial class ChronoJumpWindow
 	
 		on_extra_window_jumps_test_changed(new object(), new EventArgs());
 		on_extra_window_jumps_rj_test_changed(new object(), new EventArgs());
+		on_extra_window_runs_test_changed(new object(), new EventArgs());
+		on_extra_window_runs_interval_test_changed(new object(), new EventArgs());
 		changeTestImage("", "", "LOGO");
 
 		
@@ -513,17 +490,6 @@ public partial class ChronoJumpWindow
 		
 	}
 	
-	private void upClicked(object o, EventArgs args) {
-		Log.WriteLine("upClicked!!!");
-	}
-	private void up2Clicked(object o, EventArgs args) {
-		Log.WriteLine("up2Clicked!!!");
-	}
-	private void on_extra_window_runs_test_changed(object o, EventArgs args) {
-	}
-	private void on_extra_window_runs_more(object o, EventArgs args) {
-	}
-
 
 /*
 	private void chronopicAtStart(object o, EventArgs args) {
@@ -617,6 +583,37 @@ public partial class ChronoJumpWindow
 		UtilGtk.ColorsMenuRadio(extra_window_radio_jump_rj_hexagon);
 		UtilGtk.ColorsMenuRadio(extra_window_radio_jump_rj_more);
 
+		//runs changes
+		label_extra_window_radio_run_custom.ModifyFg(StateType.Active, UtilGtk.WHITE);
+		label_extra_window_radio_run_20m.ModifyFg(StateType.Active, UtilGtk.WHITE);
+		label_extra_window_radio_run_100m.ModifyFg(StateType.Active, UtilGtk.WHITE);
+		label_extra_window_radio_run_200m.ModifyFg(StateType.Active, UtilGtk.WHITE);
+		label_extra_window_radio_run_400m.ModifyFg(StateType.Active, UtilGtk.WHITE);
+		label_extra_window_radio_run_gesell.ModifyFg(StateType.Active, UtilGtk.WHITE);
+		label_extra_window_radio_run_20yard.ModifyFg(StateType.Active, UtilGtk.WHITE);
+		label_extra_window_radio_run_505.ModifyFg(StateType.Active, UtilGtk.WHITE);
+		label_extra_window_radio_run_illinois.ModifyFg(StateType.Active, UtilGtk.WHITE);
+		label_extra_window_radio_run_margaria.ModifyFg(StateType.Active, UtilGtk.WHITE);
+		label_extra_window_radio_run_shuttle.ModifyFg(StateType.Active, UtilGtk.WHITE);
+		label_extra_window_radio_run_zigzag.ModifyFg(StateType.Active, UtilGtk.WHITE);
+		
+		UtilGtk.ColorsMenuRadio(extra_window_radio_run_more);
+		UtilGtk.ColorsMenuRadio(extra_window_radio_run_custom);
+		UtilGtk.ColorsMenuRadio(extra_window_radio_run_20m);
+		UtilGtk.ColorsMenuRadio(extra_window_radio_run_100m);
+		UtilGtk.ColorsMenuRadio(extra_window_radio_run_200m);
+		UtilGtk.ColorsMenuRadio(extra_window_radio_run_400m);
+		UtilGtk.ColorsMenuRadio(extra_window_radio_run_gesell);
+		UtilGtk.ColorsMenuRadio(extra_window_radio_run_20yard);
+		UtilGtk.ColorsMenuRadio(extra_window_radio_run_505);
+		UtilGtk.ColorsMenuRadio(extra_window_radio_run_illinois);
+		UtilGtk.ColorsMenuRadio(extra_window_radio_run_margaria);
+		UtilGtk.ColorsMenuRadio(extra_window_radio_run_shuttle);
+		UtilGtk.ColorsMenuRadio(extra_window_radio_run_zigzag);
+		UtilGtk.ColorsMenuRadio(extra_window_radio_run_more);
+
+
+
 		//persons buttons
 		pixbuf = new Pixbuf (null, Util.GetImagePath(false) + Constants.FileNameNew1);
 		image_persons_new_1.Pixbuf = pixbuf;
@@ -2832,8 +2829,44 @@ Console.WriteLine("X");
 		reportWin = ReportWindow.Show(app1, report);
 	}
 
-	private void on_enter_notify (object o, Gtk.EnterNotifyEventArgs args) {
-		Log.WriteLine("enter notify");
+
+	void on_button_execute_test_clicked (object o, EventArgs args) {
+		if(radio_mode_jumps.Active) {
+			extra_window_jumps_weight = (double) extra_window_jumps_spinbutton_weight.Value;
+			extra_window_jumps_fall = (double) extra_window_jumps_spinbutton_fall.Value;
+			extra_window_jumps_arms = extra_window_jumps_check_dj_arms.Active;
+
+			//need to check DJ because is what happens when press DJ button
+			//need to check other because maybe we changed some option since last jump 
+			//and currentJumpType.Name is the name of last jump type, eg: DJa
+			if(currentJumpType.Name == "DJ" || 
+					currentJumpType.Name == "DJa" || currentJumpType.Name == "DJna") {
+				if(extra_window_jumps_arms)
+					currentJumpType = new JumpType("DJa");
+				else
+					currentJumpType = new JumpType("DJna");
+			}
+
+			on_normal_jump_activate(o, args);
+		}
+		else if(radio_mode_jumps_reactive.Active) {
+			extra_window_jumps_rj_limited = (double) extra_window_jumps_rj_spinbutton_limit.Value;
+			extra_window_jumps_rj_weight = (double) extra_window_jumps_rj_spinbutton_weight.Value;
+			extra_window_jumps_rj_fall = (double) extra_window_jumps_rj_spinbutton_fall.Value;
+
+			on_rj_activate(o, args);
+		}
+		else if(radio_mode_runs.Active) {
+			extra_window_runs_distance = (double) extra_window_runs_spinbutton_distance.Value;
+			
+			on_normal_run_activate(o, args);
+		}
+		else if(radio_mode_runs_intervallic.Active) {
+			extra_window_runs_interval_distance = (double) extra_window_runs_interval_spinbutton_distance.Value;
+			extra_window_runs_interval_limit = extra_window_runs_interval_spinbutton_limit.Value;
+			
+			on_run_interval_activate(o, args);
+		}
 	}
 
 
@@ -3283,58 +3316,7 @@ Console.WriteLine("X");
 	 *  --------------------------------------------------------
 	 */
 	
-	private void on_button_run_more_clicked (object o, EventArgs args) 
-	{
-		runsMoreWin = RunsMoreWindow.Show(app1, true);
-		runsMoreWin.Button_accept.Clicked += new EventHandler(on_more_runs_accepted);
-		runsMoreWin.Button_selected.Clicked += new EventHandler(on_more_runs_draw_image_test);
-	}
-	
-	private void on_more_runs_draw_image_test (object o, EventArgs args) {
-		currentEventType = new RunType(runsMoreWin.SelectedEventName);
-		changeTestImage(currentEventType.Type.ToString(), currentEventType.Name, currentEventType.ImageFileName);
-	}
-	
-	
-	private void on_button_run_last_clicked (object o, EventArgs args) 
-	{
-		Log.WriteLine("button run last");
-		//currentRunType contains the last run type
-		if(currentRunType.Distance == 0) {
-			on_run_extra_activate(o, args);
-		} else {
-			on_normal_run_activate(o, args);
-		}
-	}
-	
-	//used from the dialogue "runs more"
-	private void on_more_runs_accepted (object o, EventArgs args) 
-	{
-		runsMoreWin.Button_accept.Clicked -= new EventHandler(on_more_runs_accepted);
-	
-		currentRunType = new RunType(
-				runsMoreWin.SelectedEventName,	//name
-				false,				//hasIntervals
-				runsMoreWin.SelectedDistance,	//distance
-				false,				//tracksLimited (false, because has not intervals)
-				0,				//fixedValue (0, because has not intervals)
-				false,				//unlimited (false, because has not intervals)
-				runsMoreWin.SelectedDescription,
-				"", // distancesstring (deactivated now, TODO: activate)
-				SqliteEvent.GraphLinkSelectFileName("run", runsMoreWin.SelectedEventName)
-				);
-		
-				
-		//destroy the win for not having updating problems if a new run type is created
-		runsMoreWin.Destroy();
-		
-		if( currentRunType.Distance == 0 ) {
-			on_run_extra_activate(o, args);
-		} else {
-			on_normal_run_activate(o, args);
-		}
-	}
-	
+	/*	
 	//here comes the unlimited runs (and every run with distance = 0 (undefined)
 	private void on_run_extra_activate (object o, EventArgs args) 
 	{
@@ -3354,42 +3336,18 @@ Console.WriteLine("X");
 			runExtraWin.Button_accept.Clicked += new EventHandler(on_normal_run_activate);
 		}
 	}
+	*/
 
 	//suitable for all runs not repetitive
 	private void on_normal_run_activate (object o, EventArgs args) 
 	{
-		if (o == (object) button_run_20m || o == (object) menuitem_20m) {
-			currentRunType = new RunType("20m");
-		} else if (o == (object) button_run_100m || o == (object) menuitem_100m) {
-			currentRunType = new RunType("100m");
-		} else if (o == (object) button_run_200m || o == (object) menuitem_200m) {
-			currentRunType = new RunType("200m");
-		} else if (o == (object) button_run_400m || o == (object) menuitem_400m) {
-			currentRunType = new RunType("400m");
-		} else if (o == (object) button_run_gesell || o == (object) menuitem_run_gesell) {
-			currentRunType = new RunType("Gesell-DBT");
-		} else if (o == (object) button_run_20yard || o == (object) menuitem_run_20yard) {
-			currentRunType = new RunType("Agility-20Yard");
-		} else if (o == (object) button_run_505 || o == (object) menuitem_run_505) {
-			currentRunType = new RunType("Agility-505");
-		} else if (o == (object) button_run_illinois || o == (object) menuitem_run_illinois) {
-			currentRunType = new RunType("Agility-Illinois");
-		} else if (o == (object) button_run_shuttle || o == (object) menuitem_run_shuttle) {
-			currentRunType = new RunType("Agility-Shuttle-Run");
-		} else if (o == (object) button_run_zigzag || o == (object) menuitem_run_zigzag) {
-			currentRunType = new RunType("Agility-ZigZag");
-		} 
-		// add others...
-		
-		changeTestImage(EventType.Types.RUN.ToString(), currentRunType.Name, currentRunType.ImageFileName);
-
 		//if distance can be always different in this run,
 		//show values selected in runExtraWin
-		int myDistance = 0;		
+		double myDistance = 0;		
 		if(currentRunType.Distance == 0) {
-			myDistance = runExtraWin.Distance;
+			myDistance = extra_window_runs_distance;
 		} else {
-			myDistance = (int) currentRunType.Distance;
+			myDistance = currentRunType.Distance;
 		}
 		
 		//used by cancel and finish
@@ -3400,16 +3358,11 @@ Console.WriteLine("X");
 		sensitiveGuiEventDoing();
 	
 		//change to page 2 of notebook_results if were in other
-		notebooks_change(2);
+		//update, don't do this now, because it's buggy with currentJump on More
+		//notebooks_change(2);
 			
 		//show the event doing window
 		
-		/*
-		double progressbarLimit = 3; //3 phases for show the Dj
-		if( currentJumpType.StartIn )
-			progressbarLimit = 2; //2 for normal jump
-		*/
-		
 		double progressbarLimit = 3; //same for startingIn than out (before)
 		
 		//don't let update until test finishes
@@ -3453,6 +3406,10 @@ Console.WriteLine("X");
 			currentEventExecute.SimulateInitValues(rand);
 			
 		currentEventExecute.Manage();
+
+		thisRunIsSimple = true; //used by: on_event_execute_update_graph_in_progress_clicked
+		currentEventExecute.FakeButtonUpdateGraph.Clicked += 
+			new EventHandler(on_event_execute_update_graph_in_progress_clicked);
 		currentEventExecute.FakeButtonEventEnded.Clicked += new EventHandler(on_event_execute_EventEnded);
 		currentEventExecute.FakeButtonFinished.Clicked += new EventHandler(on_run_finished);
 	}
@@ -3489,6 +3446,8 @@ Console.WriteLine("X");
 			createChronopicWindow(true);
 		}
 		
+		lastRunIsSimple = true;
+		
 		//unhide buttons that allow jumping, running
 		sensitiveGuiEventDone();
 	}
@@ -3498,69 +3457,11 @@ Console.WriteLine("X");
 	 *  --------------------------------------------------------
 	 */
 
-	private void on_button_run_interval_more_clicked (object o, EventArgs args) 
-	{
-		runsIntervalMoreWin = RunsIntervalMoreWindow.Show(app1, true);
-		runsIntervalMoreWin.Button_accept.Clicked += new EventHandler(on_more_runs_interval_accepted);
-		runsIntervalMoreWin.Button_selected.Clicked += new EventHandler(on_more_runs_interval_draw_image_test);
-	}
-	
-	private void on_more_runs_interval_draw_image_test (object o, EventArgs args) {
-		currentEventType = new RunType(runsIntervalMoreWin.SelectedEventName);
-		changeTestImage(currentEventType.Type.ToString(), currentEventType.Name, currentEventType.ImageFileName);
-	}
-	
-	private void on_more_runs_interval_accepted (object o, EventArgs args) 
-	{
-		runsIntervalMoreWin.Button_accept.Clicked -= new EventHandler(on_more_runs_interval_accepted);
-		
-		Console.WriteLine(runsIntervalMoreWin.SelectedEventName);
-		Console.WriteLine(runsIntervalMoreWin.SelectedDistance.ToString());
-		Console.WriteLine(runsIntervalMoreWin.SelectedDistancesString);
-		currentRunType = new RunType(
-				runsIntervalMoreWin.SelectedEventName,	//name
-				true,					//hasIntervals
-				runsIntervalMoreWin.SelectedDistance,
-				runsIntervalMoreWin.SelectedTracksLimited,
-				runsIntervalMoreWin.SelectedLimitedValue,
-				runsIntervalMoreWin.SelectedUnlimited,
-				runsIntervalMoreWin.SelectedDescription,
-				runsIntervalMoreWin.SelectedDistancesString,
-				SqliteEvent.GraphLinkSelectFileName(Constants.RunIntervalTable, runsIntervalMoreWin.SelectedEventName)
-				);
-
-		bool unlimited = false;
-		if(runsIntervalMoreWin.SelectedUnlimited)
-			unlimited = true;
-
-		//destroy the win for not having updating problems if a new runInterval type is created
-		runsIntervalMoreWin.Destroy();
-		
-		//go to run extra if we need something to define
-		if( currentRunType.Distance == 0 || 
-				//(currentRunType.FixedValue == 0 && ! runsIntervalMoreWin.SelectedUnlimited) ) {
-				(currentRunType.FixedValue == 0 && ! unlimited) ) {
-			on_run_extra_activate(o, args);
-		} else {
-			on_run_interval_accepted(o, args);
-		}
-	}
-	
-	private void on_button_run_interval_last_clicked (object o, EventArgs args) 
-	{
-		//go to run extra if we need something to define
-		if( currentRunType.Distance == 0 || 
-				(currentRunType.FixedValue == 0 && ! currentRunType.Unlimited) ) {
-			on_run_extra_activate(o, args);
-		} else {
-			on_run_interval_accepted(o, args);
-		}
-	}
 	
 	//interval runs clicked from user interface
 	//(not suitable for the other runs we found in "more")
 	private void on_run_interval_activate (object o, EventArgs args) 
-	{
+	{/*
 		if(o == (object) button_run_interval_by_laps || o == (object) menuitem_run_interval_by_laps) 
 		{	
 			currentRunType = new RunType("byLaps");
@@ -3582,11 +3483,12 @@ Console.WriteLine("X");
 		} else {
 			on_run_interval_accepted(o, args);
 		}
-			
+	*/		
 	}
 	
 	private void on_run_interval_accepted (object o, EventArgs args)
 	{
+		/*
 		Log.WriteLine("run interval accepted");
 		
 		//if distance can be always different in this run,
@@ -3664,8 +3566,13 @@ Console.WriteLine("X");
 			currentEventExecute.SimulateInitValues(rand);
 			
 		currentEventExecute.Manage();
+		
+		thisRunIsSimple = false; //used by: on_event_execute_update_graph_in_progress_clicked
+		currentEventExecute.FakeButtonUpdateGraph.Clicked += 
+			new EventHandler(on_event_execute_update_graph_in_progress_clicked);
 		currentEventExecute.FakeButtonEventEnded.Clicked += new EventHandler(on_event_execute_EventEnded);
 		currentEventExecute.FakeButtonFinished.Clicked += new EventHandler(on_run_interval_finished);
+		*/
 	}
 
 
@@ -4280,6 +4187,9 @@ Console.WriteLine("X");
 								currentJumpRj.TvString, currentJumpRj.TcString, volumeOn, repetitiveConditionsWin);
 					break;
 				case EventType.Types.RUN:
+					if(lastRunIsSimple) 
+						PrepareRunSimpleGraph(currentRun.Time, currentRun.Speed);
+					/*
 					if(currentRunType.HasIntervals) {
 							RunType runType = SqliteRunIntervalType.SelectAndReturnRunIntervalType(currentRunInterval.Type);
 							double distanceTotal = Util.GetRunITotalDistance(currentRunInterval.DistanceInterval, 
@@ -4298,6 +4208,7 @@ Console.WriteLine("X");
 								volumeOn, repetitiveConditionsWin);
 					} else
 						PrepareRunSimpleGraph(currentRun.Time, currentRun.Speed);
+					*/
 					break;
 				case EventType.Types.PULSE:
 					PreparePulseGraph(Util.GetLast(currentPulse.TimesString), currentPulse.TimesString);
@@ -5124,8 +5035,8 @@ Console.WriteLine("X");
 				Catalog.GetString("Use these keys in order to work faster.") + "\n\n" +
 				"- " + Catalog.GetString("On execute test tab:") + "\n\n" +
 				"<tt><b>p</b></tt> " + Catalog.GetString("Edit selected person") + "\n" +
-				"<tt><b>CTRL+" + Catalog.GetString("CURSOR_UP") + "</b></tt> " + Catalog.GetString("Select previous person in list") + "\n" +
-				"<tt><b>CTRL+" + Catalog.GetString("CURSOR_DOWN") + "</b></tt> " + Catalog.GetString("Select next person in list") + "\n" +
+				"<tt><b>CTRL+" + Catalog.GetString("CURSOR_UP") + "</b></tt> " + Catalog.GetString("Select previous person") + "\n" +
+				"<tt><b>CTRL+" + Catalog.GetString("CURSOR_DOWN") + "</b></tt> " + Catalog.GetString("Select next person") + "\n" +
 				"<tt><b>(space)</b></tt> " + Catalog.GetString("Execute test") + "\n" +
 				"\n" + "- " + Catalog.GetString("On results tab:") + "\n\n" +
 				"<tt><b>z</b></tt> " + Catalog.GetString("Zoom change") + "\n" +
@@ -5198,19 +5109,6 @@ Console.WriteLine("X");
 		button_delete_current_person.Sensitive = option;
 	}
 
-	private void menuRunsSensitive(bool option)
-	{
-		menu_execute_simple_runs1.Sensitive = option;
-		menuitem_edit_selected_run.Sensitive = option;
-		menuitem_delete_selected_run.Sensitive = option;
-		menu_execute_intervallic_runs1.Sensitive = option;
-		menuitem_edit_selected_run_interval.Sensitive = option;
-		menuitem_repair_selected_run_interval.Sensitive = option;
-		menuitem_delete_selected_run_interval.Sensitive = option;
-		menuitem_run_type_add.Sensitive = option;
-		menuitem_run_type_delete_intervallic.Sensitive = option;
-	}
-	
 	private void menuOtherSensitive(bool option)
 	{
 		menuitem_reaction_time.Sensitive = option;
@@ -5236,7 +5134,6 @@ Console.WriteLine("X");
 		//menuitems
 		menuSessionSensitive(false);
 		menuPersonSelectedSensitive(false);
-		menuRunsSensitive(false);
 		menuOtherSensitive(false);
 		menuToolsSensitive(false);
 		
@@ -5257,10 +5154,6 @@ Console.WriteLine("X");
 		hbox_execute_test.Sensitive = false;
 		button_execute_test.Sensitive = false;
 		eventExecuteHideAllTables();
-		
-		//button_last.Sensitive = false;
-		button_run_last.Sensitive=false;
-		button_run_interval_last.Sensitive=false;
 	}
 	
 	private void sensitiveGuiYesSession () {
@@ -5291,7 +5184,6 @@ Console.WriteLine("X");
 		treeview_persons.Sensitive = false;
 		
 		menuPersonSelectedSensitive(false);
-		menuRunsSensitive(false);
 		menuOtherSensitive(false);
 		menuToolsSensitive(false);
 	}
@@ -5307,7 +5199,6 @@ Console.WriteLine("X");
 		treeview_persons.Sensitive = true;
 		
 		menuPersonSelectedSensitive(true);
-		menuRunsSensitive(true);
 		menuOtherSensitive(true);
 		menuToolsSensitive(true);
 	
@@ -5334,7 +5225,6 @@ Console.WriteLine("X");
 		hbox_pulses.Sensitive = false;
 		
 		//menu
-		menuRunsSensitive(false);
 		menuOtherSensitive(false);
 			
 		hbox_multi_chronopic_buttons.Sensitive = false;
@@ -5353,15 +5243,6 @@ Console.WriteLine("X");
 		//allow repeat last jump or run (check also if it wasn't cancelled)
 		if(! currentEventExecute.Cancel) {
 			switch (currentEventType.Type) {
-				case EventType.Types.RUN:
-					if(currentRunType.HasIntervals) {
-						button_run_interval_last.Sensitive = true;
-						button_run_last.Sensitive = false;
-					} else {
-						button_run_last.Sensitive = true;
-						button_run_interval_last.Sensitive = false;
-					}
-					break;
 				case EventType.Types.REACTIONTIME:
 					Log.WriteLine("sensitiveGuiEventDone reaction time");
 					break;
@@ -5378,7 +5259,6 @@ Console.WriteLine("X");
 		}
 		
 		//menu
-		menuRunsSensitive(true);
 		menuOtherSensitive(true);
 	}
 
@@ -5412,8 +5292,6 @@ Console.WriteLine("X");
 			success = true;
 		} 
 		if (type == "ALL" || type == "Run") {
-			menuitem_edit_selected_run.Sensitive = show;
-			menuitem_delete_selected_run.Sensitive = show;
 			button_edit_selected_run.Sensitive = show;
 			button_delete_selected_run.Sensitive = show;
 
@@ -5427,12 +5305,9 @@ Console.WriteLine("X");
 			success = true;
 		} 
 		if (type == "ALL" || type == "RunInterval") {
-			menuitem_edit_selected_run_interval.Sensitive = show;
-			menuitem_delete_selected_run_interval.Sensitive = show;
 			button_edit_selected_run_interval.Sensitive = show;
 			button_delete_selected_run_interval.Sensitive = show;
 			button_repair_selected_run_interval.Sensitive = show;
-			menuitem_repair_selected_run_interval.Sensitive = show;
 			
 			button_video_play_selected_run_interval.Sensitive = false;
 			if (myTreeViewRunsInterval.EventSelectedID > 0 && File.Exists(Util.GetVideoFileName(
diff --git a/src/gui/eventExecute.cs b/src/gui/eventExecute.cs
index f25da5c..96e369a 100644
--- a/src/gui/eventExecute.cs
+++ b/src/gui/eventExecute.cs
@@ -31,6 +31,13 @@ using LongoMatch.Video.Common;
 
 
 
+//--------------------------------------------------------
+//---------------- this WIDGET ---------------------------
+//---------------- is included in main gui ---------------
+//---------------- since 0.9.3 ---------------------------
+//--------------------------------------------------------
+
+
 public partial class ChronoJumpWindow 
 {
 //	[Widget] Gtk.Window event_execute;
@@ -1828,6 +1835,14 @@ Log.WriteLine("Preparing reactive A");
 							volumeOn, repetitiveConditionsWin);
 				}
 				break;
+			case EventType.Types.RUN:
+				if(lastRunIsSimple) {
+					Log.Write("update graph: RUN");
+					PrepareRunSimpleGraph(
+							currentEventExecute.PrepareEventGraphRunSimpleObject.time,
+							currentEventExecute.PrepareEventGraphRunSimpleObject.speed);
+				}
+				break;
 		}
 
 	}
diff --git a/src/gui/jump.cs b/src/gui/jump.cs
index ccd4f11..52cbbb1 100644
--- a/src/gui/jump.cs
+++ b/src/gui/jump.cs
@@ -778,6 +778,7 @@ public class RepairJumpRjWindow
 
 //--------------------------------------------------------
 //---------------- jump extra WIDGET --------------------
+//---------------- in 0.9.3 included in main gui ---------
 //--------------------------------------------------------
 
 partial class ChronoJumpWindow
@@ -806,7 +807,8 @@ partial class ChronoJumpWindow
 	[Widget] Gtk.Label extra_window_jumps_rj_label_fall;
 	[Widget] Gtk.Label extra_window_jumps_rj_label_cm;
 	[Widget] Gtk.Label extra_window_label_jumps_rj_no_options;
-	
+
+	//labels notebook_execute	
 	[Widget] Gtk.Label label_extra_window_radio_jump_free;
 	[Widget] Gtk.Label label_extra_window_radio_jump_sj;
 	[Widget] Gtk.Label label_extra_window_radio_jump_sjl;
@@ -818,6 +820,7 @@ partial class ChronoJumpWindow
 	[Widget] Gtk.Label label_extra_window_radio_jump_takeoff;
 	[Widget] Gtk.Label label_extra_window_radio_jump_more;
 
+	//radio notebook_execute	
 	[Widget] Gtk.RadioButton extra_window_radio_jump_free;
 	[Widget] Gtk.RadioButton extra_window_radio_jump_sj;
 	[Widget] Gtk.RadioButton extra_window_radio_jump_sjl;
@@ -840,7 +843,8 @@ partial class ChronoJumpWindow
 	[Widget] Gtk.RadioButton extra_window_radio_jump_rj_unlimited;
 	[Widget] Gtk.RadioButton extra_window_radio_jump_rj_hexagon;
 	[Widget] Gtk.RadioButton extra_window_radio_jump_rj_more;
-	
+
+	//selected test labels	
 	[Widget] Gtk.Label extra_window_jumps_label_selected;
 	[Widget] Gtk.Label extra_window_jumps_rj_label_selected;
 	
@@ -861,8 +865,8 @@ partial class ChronoJumpWindow
 	double extra_window_jumps_rj_weight = 20;
 	double extra_window_jumps_rj_fall = 20;
 	
-	private static JumpType previousJumpType; //used on More to turnback if cancel or delete event is pressed
-	private static JumpType previousJumpRjType; //used on More to turnback if cancel or delete event is pressed
+	private JumpType previousJumpType; //used on More to turnback if cancel or delete event is pressed
+	private JumpType previousJumpRjType; //used on More to turnback if cancel or delete event is pressed
 	
 	private void on_extra_window_jumps_test_changed(object o, EventArgs args)
 	{
@@ -965,7 +969,7 @@ partial class ChronoJumpWindow
 			extra_window_jumps_radiobutton_weight.Active = true;
 		}
 
-		extra_window_showNoOptions(myJumpType, hasOptions);
+		extra_window_jumps_showNoOptions(myJumpType, hasOptions);
 	}
 	
 	private void extra_window_jumps_rj_initialize(JumpType myJumpType) 
@@ -1020,7 +1024,7 @@ partial class ChronoJumpWindow
 			extra_window_jumps_rj_radiobutton_weight.Active = true;
 		}
 
-		extra_window_showNoOptions(myJumpType, hasOptions);
+		extra_window_jumps_showNoOptions(myJumpType, hasOptions);
 	}
 
 
@@ -1078,10 +1082,11 @@ partial class ChronoJumpWindow
 				SqliteEvent.GraphLinkSelectFileName("jumpRj", jumpsRjMoreWin.SelectedEventName)
 				);
 
-		//destroy the win for not having updating problems if a new jump type is created
-		jumpsRjMoreWin.Destroy();
 		
 		extra_window_jumps_rj_toggle_desired_button_on_toolbar(currentJumpRjType);
+	
+		//destroy the win for not having updating problems if a new jump type is created
+		jumpsRjMoreWin.Destroy();
 	}
 
 	//if it's cancelled (or deleted event) select desired toolbar button
@@ -1171,7 +1176,7 @@ partial class ChronoJumpWindow
 	}
 	
 			
-	private void extra_window_showNoOptions(JumpType myJumpType, bool hasOptions) {
+	private void extra_window_jumps_showNoOptions(JumpType myJumpType, bool hasOptions) {
 		if(myJumpType.IsRepetitive) 
 			extra_window_label_jumps_rj_no_options.Visible = ! hasOptions;
 		else 
@@ -1179,33 +1184,6 @@ partial class ChronoJumpWindow
 	}
 
 
-	void on_button_execute_test_clicked (object o, EventArgs args) {
-		if(radio_mode_jumps.Active) {
-			extra_window_jumps_weight = (double) extra_window_jumps_spinbutton_weight.Value;
-			extra_window_jumps_fall = (double) extra_window_jumps_spinbutton_fall.Value;
-			extra_window_jumps_arms = extra_window_jumps_check_dj_arms.Active;
-
-			//need to check DJ because is what happens when press DJ button
-			//need to check other because maybe we changed some option since last jump 
-			//and currentJumpType.Name is the name of last jump type, eg: DJa
-			if(currentJumpType.Name == "DJ" || 
-					currentJumpType.Name == "DJa" || currentJumpType.Name == "DJna") {
-				if(extra_window_jumps_arms)
-					currentJumpType = new JumpType("DJa");
-				else
-					currentJumpType = new JumpType("DJna");
-			}
-
-			on_normal_jump_activate(o, args);
-		} else if(radio_mode_jumps_reactive.Active) {
-			extra_window_jumps_rj_limited = (double) extra_window_jumps_rj_spinbutton_limit.Value;
-			extra_window_jumps_rj_weight = (double) extra_window_jumps_rj_spinbutton_weight.Value;
-			extra_window_jumps_rj_fall = (double) extra_window_jumps_rj_spinbutton_fall.Value;
-
-			on_rj_activate(o, args);
-		}
-	}
-
 
 	private void on_extra_window_jumps_radiobutton_kg_toggled (object o, EventArgs args)
 	{
diff --git a/src/gui/run.cs b/src/gui/run.cs
index 9749920..39e553a 100644
--- a/src/gui/run.cs
+++ b/src/gui/run.cs
@@ -871,125 +871,341 @@ public class RepairRunIntervalWindow
 
 //--------------------------------------------------------
 //---------------- run extra WIDGET --------------------
+//---------------- in 0.9.3 included in main gui ---------
 //--------------------------------------------------------
 
-public class RunExtraWindow 
+partial class ChronoJumpWindow
 {
-	[Widget] Gtk.Label label_limit;
-	[Widget] Gtk.SpinButton spinbutton_limit;
-	[Widget] Gtk.Label label_limit_units;
-	[Widget] Gtk.Label label_distance;
-	[Widget] Gtk.SpinButton distance_limit;
-	[Widget] Gtk.Label label_distance_units;
-	[Widget] Gtk.Window run_extra;
-	[Widget] Gtk.SpinButton spinbutton_distance;
-	[Widget] Gtk.Button button_accept;
 
-	static int distance;
-	static int limited = 10;
+	//labels notebook_execute	
+	[Widget] Gtk.Label label_extra_window_radio_run_custom;
+	[Widget] Gtk.Label label_extra_window_radio_run_20m;
+	[Widget] Gtk.Label label_extra_window_radio_run_100m;
+	[Widget] Gtk.Label label_extra_window_radio_run_200m;
+	[Widget] Gtk.Label label_extra_window_radio_run_400m;
+	[Widget] Gtk.Label label_extra_window_radio_run_gesell;
+	[Widget] Gtk.Label label_extra_window_radio_run_20yard;
+	[Widget] Gtk.Label label_extra_window_radio_run_505;
+	[Widget] Gtk.Label label_extra_window_radio_run_illinois;
+	[Widget] Gtk.Label label_extra_window_radio_run_margaria;
+	[Widget] Gtk.Label label_extra_window_radio_run_shuttle;
+	[Widget] Gtk.Label label_extra_window_radio_run_zigzag;
+	[Widget] Gtk.Label label_extra_window_radio_run_more;
+	
+	//radio notebook_execute	
+	[Widget] Gtk.RadioButton extra_window_radio_run_custom;
+	[Widget] Gtk.RadioButton extra_window_radio_run_20m;
+	[Widget] Gtk.RadioButton extra_window_radio_run_100m;
+	[Widget] Gtk.RadioButton extra_window_radio_run_200m;
+	[Widget] Gtk.RadioButton extra_window_radio_run_400m;
+	[Widget] Gtk.RadioButton extra_window_radio_run_gesell;
+	[Widget] Gtk.RadioButton extra_window_radio_run_20yard;
+	[Widget] Gtk.RadioButton extra_window_radio_run_505;
+	[Widget] Gtk.RadioButton extra_window_radio_run_illinois;
+	[Widget] Gtk.RadioButton extra_window_radio_run_margaria;
+	[Widget] Gtk.RadioButton extra_window_radio_run_shuttle;
+	[Widget] Gtk.RadioButton extra_window_radio_run_zigzag;
+	[Widget] Gtk.RadioButton extra_window_radio_run_more;
+
+
+	//options runs
+	[Widget] Gtk.Label extra_window_runs_label_distance;
+	[Widget] Gtk.SpinButton extra_window_runs_spinbutton_distance;
+	[Widget] Gtk.Label extra_window_runs_label_distance_units;
+
+	[Widget] Gtk.Label extra_window_label_runs_no_options;
+	
+	//options runs interval
+	[Widget] Gtk.Label extra_window_runs_interval_label_distance;
+	[Widget] Gtk.SpinButton extra_window_runs_interval_spinbutton_distance;
+	[Widget] Gtk.Label extra_window_runs_interval_label_distance_units;
+
+	[Widget] Gtk.Label extra_window_runs_interval_label_limit;
+	[Widget] Gtk.SpinButton extra_window_runs_interval_spinbutton_limit;
+	[Widget] Gtk.Label extra_window_runs_interval_label_limit_units;
+
+	[Widget] Gtk.Label extra_window_label_runs_interval_no_options;
+
+	//selected test labels	
+	[Widget] Gtk.Label extra_window_runs_label_selected;
+	[Widget] Gtk.Label extra_window_runs_interval_label_selected;
+
+	double extra_window_runs_distance = 100;
+	double extra_window_runs_interval_distance = 100;
+	double extra_window_runs_interval_limit = 10;
+
+	private RunType previousRunType; //used on More to turnback if cancel or delete event is pressed
+	private RunType previousRunIntervalType; //used on More to turnback if cancel or delete event is pressed
+
+	
+	private void on_extra_window_runs_test_changed(object o, EventArgs args)
+	{
+		if(extra_window_radio_run_custom.Active) currentRunType = new RunType("Custom");
+		else if(extra_window_radio_run_20m.Active) currentRunType = new RunType("20m");
+		else if(extra_window_radio_run_100m.Active) currentRunType = new RunType("100m");
+		else if(extra_window_radio_run_200m.Active) currentRunType = new RunType("200m");
+		else if(extra_window_radio_run_400m.Active) currentRunType = new RunType("400m");
+		else if(extra_window_radio_run_gesell.Active) currentRunType = new RunType("Gesell-DBT");
+		else if(extra_window_radio_run_20yard.Active) currentRunType = new RunType("Agility-20Yard");
+		else if(extra_window_radio_run_505.Active) currentRunType = new RunType("Agility-505");
+		else if(extra_window_radio_run_illinois.Active) currentRunType = new RunType("Agility-Illinois");
+		else if(extra_window_radio_run_margaria.Active) currentRunType = new RunType("Margaria");
+		else if(extra_window_radio_run_shuttle.Active) currentRunType = new RunType("Agility-Shuttle-Run");
+		else if(extra_window_radio_run_zigzag.Active) currentRunType = new RunType("Agility-ZigZag");
+
+		extra_window_runs_initialize(currentRunType);
+	}
+
+	private void on_extra_window_runs_more(object o, EventArgs args)
+	{
+		previousRunType = currentRunType;
+
+		if(extra_window_radio_run_more.Active) {
+			runsMoreWin = RunsMoreWindow.Show(app1, true);
+			runsMoreWin.Button_accept.Clicked += new EventHandler(on_more_runs_accepted);
+			runsMoreWin.Button_cancel.Clicked += new EventHandler(on_more_runs_cancelled);
+			runsMoreWin.Button_selected.Clicked += new EventHandler(on_more_runs_draw_image_test);
+		}
+	}
 	
-	static RunExtraWindow RunExtraWindowBox;
-	Gtk.Window parent;
+	private void on_extra_window_runs_interval_test_changed(object o, EventArgs args)
+	{
+	}
+	
+	private void on_extra_window_runs_interval_more(object o, EventArgs args)
+	{
+		previousRunIntervalType = currentRunIntervalType;
 
-	RunExtraWindow (Gtk.Window parent) {
-		Glade.XML gladeXML;
-		gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "run_extra", null);
-		gladeXML.Autoconnect(this);
-		this.parent = parent;
-		
-		//put an icon to window
-		UtilGtk.IconWindow(run_extra);
+		if(extra_window_radio_run_more.Active) {
+			runsIntervalMoreWin = RunsIntervalMoreWindow.Show(app1, true);
+			runsIntervalMoreWin.Button_accept.Clicked += new EventHandler(on_more_runs_interval_accepted);
+			runsIntervalMoreWin.Button_cancel.Clicked += new EventHandler(on_more_runs_interval_cancelled);
+			runsIntervalMoreWin.Button_selected.Clicked += new EventHandler(on_more_runs_interval_draw_image_test);
+		}
 	}
 	
-	static public RunExtraWindow Show (Gtk.Window parent, RunType myRunType) 
+	private void extra_window_runs_initialize(RunType myRunType) 
 	{
-		if (RunExtraWindowBox == null) {
-			RunExtraWindowBox = new RunExtraWindow (parent);
+		extra_window_runs_label_selected.Text = "<b>" + Catalog.GetString(myRunType.Name) + "</b>";
+		extra_window_runs_label_selected.UseMarkup = true; 
+		currentEventType = myRunType;
+		changeTestImage(EventType.Types.RUN.ToString(), myRunType.Name, myRunType.ImageFileName);
+		bool hasOptions = false;
+
+		extra_window_runs_label_distance.Text = Catalog.GetString("Track distance\n(between platforms)");
+		extra_window_runs_label_distance_units.Text = Catalog.GetString("meters");
+
+		if(myRunType.Distance > 0) {
+			extra_window_runs_spinbutton_distance.Value = myRunType.Distance;
+			extra_window_showDistanceData(myRunType, true, false);	//visible, sensitive
+		} else {
+			if(myRunType.Name == "Margaria") {
+				extra_window_runs_label_distance.Text = Catalog.GetString("Vertical distance between\nstairs third and nine.");
+				extra_window_runs_label_distance_units.Text = Catalog.GetString("Millimeters.");
+				extra_window_runs_spinbutton_distance.Value = 1050;
+			} else {
+				extra_window_runs_spinbutton_distance.Value = extra_window_runs_distance; 
+			}
+			extra_window_showDistanceData(myRunType, true, true);	//visible, sensitive
+
 		}
-		
-		if(myRunType.HasIntervals && ! myRunType.Unlimited) {
+
+		hasOptions = true;
+		extra_window_runs_showNoOptions(myRunType, hasOptions);
+	}
+	
+	private void extra_window_runs_interval_initialize(RunType myRunType) 
+	{
+		extra_window_runs_interval_label_selected.Text = "<b>" + Catalog.GetString(myRunType.Name) + "</b>";
+		extra_window_runs_interval_label_selected.UseMarkup = true; 
+		currentEventType = myRunType;
+		changeTestImage(EventType.Types.RUN.ToString(), myRunType.Name, myRunType.ImageFileName);
+		bool hasOptions = false;
+
+		if(myRunType.Distance > 0) {
+			extra_window_runs_interval_spinbutton_distance.Value = myRunType.Distance;
+			extra_window_showDistanceData(myRunType, true, false);	//visible, sensitive
+			hasOptions = true;
+		} else if(myRunType.Distance == 0) {
+			extra_window_runs_interval_spinbutton_distance.Value = extra_window_runs_interval_distance; 
+			extra_window_showDistanceData(myRunType, true, true);	//visible, sensitive
+			hasOptions = true;
+		} else { //variableDistancesString (eg. MTGUG) don't show anything
+			extra_window_showDistanceData(myRunType, false, false);	//visible, sensitive
+		}
+
+		if(! myRunType.Unlimited) {
 			string tracksName = Catalog.GetString("tracks");
 			string secondsName = Catalog.GetString("seconds");
 			if(myRunType.TracksLimited) 
-				RunExtraWindowBox.label_limit_units.Text = tracksName;
+				extra_window_runs_interval_label_limit_units.Text = tracksName;
 			else 
-				RunExtraWindowBox.label_limit_units.Text = secondsName;
+				extra_window_runs_interval_label_limit_units.Text = secondsName;
 			
 			if(myRunType.FixedValue > 0) {
-				RunExtraWindowBox.spinbutton_limit.Sensitive = false;
-				RunExtraWindowBox.spinbutton_limit.Value = myRunType.FixedValue;
+				extra_window_runs_interval_spinbutton_limit.Value = myRunType.FixedValue;
+				extra_window_showLimitData(true, false);	//visible, sensitive
+			} else {
+				extra_window_runs_interval_spinbutton_limit.Value = extra_window_runs_interval_limit;
+				extra_window_showLimitData(true, true);	//visible, sensitive
 			}
+			hasOptions = true;
 		} else {
-			hideIntervalData();	
+			extra_window_showLimitData(false, false);	//visible, sensitive
 		}
 
-		if(myRunType.Distance > 0) {
-			hideDistanceData();	
-		}
-		
-		if(myRunType.Name == "Margaria") {
-			RunExtraWindowBox.label_distance.Text = Catalog.GetString("Vertical distance between\nstairs third and nine.");
-			RunExtraWindowBox.label_distance_units.Text = Catalog.GetString("Millimeters.");
-			distance = 1050;
-		} else
-			distance = 100;
-		
-		RunExtraWindowBox.spinbutton_distance.Value = distance;
-		RunExtraWindowBox.spinbutton_limit.Value = limited;
-		
-		RunExtraWindowBox.run_extra.Show ();
+		extra_window_runs_showNoOptions(myRunType, hasOptions);
+	}
 
-		return RunExtraWindowBox;
+	private void on_more_runs_draw_image_test (object o, EventArgs args) {
+		currentEventType = new RunType(runsMoreWin.SelectedEventName);
+		changeTestImage(currentEventType.Type.ToString(), currentEventType.Name, currentEventType.ImageFileName);
 	}
 	
-	static void hideIntervalData () {
-		RunExtraWindowBox.label_limit.Sensitive = false;
-		RunExtraWindowBox.spinbutton_limit.Sensitive = false;
-		RunExtraWindowBox.label_limit_units.Sensitive = false;
+	private void on_more_runs_interval_draw_image_test (object o, EventArgs args) {
+		currentEventType = new RunType(runsIntervalMoreWin.SelectedEventName);
+		changeTestImage(currentEventType.Type.ToString(), currentEventType.Name, currentEventType.ImageFileName);
 	}
 	
-	static void hideDistanceData () {
-		RunExtraWindowBox.label_distance.Sensitive = false;
-		RunExtraWindowBox.spinbutton_distance.Sensitive = false;
-		RunExtraWindowBox.label_distance_units.Sensitive = false;
+	
+	//used from the dialogue "runs more"
+	private void on_more_runs_accepted (object o, EventArgs args) 
+	{
+		runsMoreWin.Button_accept.Clicked -= new EventHandler(on_more_runs_accepted);
+	
+		currentRunType = new RunType(
+				runsMoreWin.SelectedEventName,	//name
+				false,				//hasIntervals
+				runsMoreWin.SelectedDistance,	//distance
+				false,				//tracksLimited (false, because has not intervals)
+				0,				//fixedValue (0, because has not intervals)
+				false,				//unlimited (false, because has not intervals)
+				runsMoreWin.SelectedDescription,
+				"", // distancesstring (deactivated now, TODO: activate)
+				SqliteEvent.GraphLinkSelectFileName("run", runsMoreWin.SelectedEventName)
+				);
+		
+		extra_window_runs_toggle_desired_button_on_toolbar(currentRunType);
+				
+		//destroy the win for not having updating problems if a new run type is created
+		runsMoreWin.Destroy();
 	}
 	
-	void on_button_cancel_clicked (object o, EventArgs args)
+	private void on_more_runs_interval_accepted (object o, EventArgs args) 
 	{
-		RunExtraWindowBox.run_extra.Hide();
-		RunExtraWindowBox = null;
+		runsIntervalMoreWin.Button_accept.Clicked -= new EventHandler(on_more_runs_interval_accepted);
+		
+		currentRunType = new RunType(
+				runsIntervalMoreWin.SelectedEventName,	//name
+				true,					//hasIntervals
+				runsIntervalMoreWin.SelectedDistance,
+				runsIntervalMoreWin.SelectedTracksLimited,
+				runsIntervalMoreWin.SelectedLimitedValue,
+				runsIntervalMoreWin.SelectedUnlimited,
+				runsIntervalMoreWin.SelectedDescription,
+				runsIntervalMoreWin.SelectedDistancesString,
+				SqliteEvent.GraphLinkSelectFileName(Constants.RunIntervalTable, runsIntervalMoreWin.SelectedEventName)
+				);
+
+		/*
+		bool unlimited = false;
+		if(runsIntervalMoreWin.SelectedUnlimited)
+			unlimited = true;
+			*/
+		
+		extra_window_runs_interval_toggle_desired_button_on_toolbar(currentRunIntervalType);
+
+		//destroy the win for not having updating problems if a new runInterval type is created
+		runsIntervalMoreWin.Destroy();
+		
+		/*
+		//go to run extra if we need something to define
+		if( currentRunType.Distance == 0 || 
+				//(currentRunType.FixedValue == 0 && ! runsIntervalMoreWin.SelectedUnlimited) ) {
+				(currentRunType.FixedValue == 0 && ! unlimited) ) {
+			on_run_extra_activate(o, args);
+		} else {
+			on_run_interval_accepted(o, args);
+		}
+		*/
 	}
 	
-	void on_run_extra_delete_event (object o, DeleteEventArgs args)
+	//if it's cancelled (or deleted event) select desired toolbar button
+	private void on_more_runs_cancelled (object o, EventArgs args) 
 	{
-		RunExtraWindowBox.run_extra.Hide();
-		RunExtraWindowBox = null;
+		currentRunType = previousRunType;
+		extra_window_runs_toggle_desired_button_on_toolbar(currentRunType);
 	}
 	
-	void on_button_accept_clicked (object o, EventArgs args)
+	private void on_more_runs_interval_cancelled (object o, EventArgs args) 
 	{
-		distance = (int) spinbutton_distance.Value;
-		limited = (int) spinbutton_limit.Value;
-		
-		RunExtraWindowBox.run_extra.Hide();
-		RunExtraWindowBox = null;
+		currentRunIntervalType = previousRunIntervalType;
+		extra_window_runs_interval_toggle_desired_button_on_toolbar(currentRunIntervalType);
+	}
+	
+	private void extra_window_runs_toggle_desired_button_on_toolbar(RunType type) {
+		if(type.Name == "Custom") extra_window_radio_run_custom.Active = true;
+		else if(type.Name == "20m") extra_window_radio_run_20m.Active = true;
+		else if(type.Name == "100m") extra_window_radio_run_100m.Active = true;
+		else if(type.Name == "200m") extra_window_radio_run_200m.Active = true;
+		else if(type.Name == "400m") extra_window_radio_run_400m.Active = true;
+		else if(type.Name == "Gesell-DBT") extra_window_radio_run_gesell.Active = true;
+		else if(type.Name == "Agility-20Yard") extra_window_radio_run_20yard.Active = true;
+		else if(type.Name == "Agility-505") extra_window_radio_run_505.Active = true;
+		else if(type.Name == "Agility-Illinois") extra_window_radio_run_illinois.Active = true;
+		else if(type.Name == "Margaria") extra_window_radio_run_margaria.Active = true;
+		else if(type.Name == "Agility-Shuttle-Run") extra_window_radio_run_shuttle.Active = true;
+		else if(type.Name == "Agility-ZigZag") extra_window_radio_run_zigzag.Active = true;
+		else {
+			//don't do this:
+			//extra_window_radio_run_more.Active = true;
+			//because it will be a loop
+			//only do:
+			extra_window_runs_initialize(type);
+		}
+	}
+	
+	private void extra_window_runs_interval_toggle_desired_button_on_toolbar(RunType type) {
 	}
 
-	public Button Button_accept 
-	{
-		set { button_accept = value;	}
-		get { return button_accept;	}
+	private void extra_window_showDistanceData (RunType myRunType, bool show, bool sensitive ) {
+		if(myRunType.HasIntervals) {
+			extra_window_runs_interval_label_distance.Visible = show;
+			extra_window_runs_interval_spinbutton_distance.Visible = show;
+			extra_window_runs_interval_label_distance_units.Visible = show;
+		
+			extra_window_runs_interval_label_distance.Sensitive = sensitive;
+			extra_window_runs_interval_spinbutton_distance.Sensitive = sensitive;
+			extra_window_runs_interval_label_distance_units.Sensitive = sensitive;
+		} else {
+			extra_window_runs_label_distance.Visible = show;
+			extra_window_runs_spinbutton_distance.Visible = show;
+			extra_window_runs_label_distance_units.Visible = show;
+		
+			extra_window_runs_label_distance.Sensitive = sensitive;
+			extra_window_runs_spinbutton_distance.Sensitive = sensitive;
+			extra_window_runs_label_distance_units.Sensitive = sensitive;
+		}
 	}
 	
-	public int Distance 
-	{
-		get { return distance;	}
+	private void extra_window_showLimitData (bool show, bool sensitive ) {
+		extra_window_runs_interval_label_limit.Visible = show;
+		extra_window_runs_interval_spinbutton_limit.Visible = show;
+		extra_window_runs_interval_label_limit_units.Visible = show;
+		
+		extra_window_runs_interval_label_limit.Sensitive = sensitive;
+		extra_window_runs_interval_spinbutton_limit.Sensitive = sensitive;
+		extra_window_runs_interval_label_limit_units.Sensitive = sensitive;
 	}
 	
-	public int Limited 
-	{
-		get { return limited;	}
+	private void extra_window_runs_showNoOptions(RunType myRunType, bool hasOptions) {
+		if(myRunType.HasIntervals) 
+			extra_window_label_runs_interval_no_options.Visible = ! hasOptions;
+		else 
+			extra_window_label_runs_no_options.Visible = ! hasOptions;
 	}
+
+
 }
 
 
diff --git a/src/runType.cs b/src/runType.cs
index e47c7e1..bddecd8 100644
--- a/src/runType.cs
+++ b/src/runType.cs
@@ -47,7 +47,7 @@ public class RunType : EventType
 			"Agility-Illinois", "Agility-Shuttle-Run" , "Agility-ZigZag",
 			"byLaps", "byTime", "unlimited", 
 			"20m10times", "7m30seconds", "20m endurance", 
-			"MTGUG" 
+			"MTGUG", "Gesell-DBT"
 		};
 
 		foreach(string search in predefinedTests)



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