[chronojump] 4 modes: jumps, runs, encoder, other



commit 21fd1087953fcc35f9e1e508596d1beee9e06034
Author: Xavier de Blas <xaviblas gmail com>
Date:   Sun Jun 15 14:42:52 2014 +0200

    4 modes: jumps, runs, encoder, other

 glade/chronojump.glade |  419 +++++++++++++++++++++++++++++++++++++++---------
 src/gui/chronojump.cs  |   84 +++++++---
 2 files changed, 403 insertions(+), 100 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index a1d756d..6ed957c 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -238,23 +238,45 @@
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <child>
-                      <widget class="GtkRadioMenuItem" id="radio_menuitem_mode_contacts">
+                      <widget class="GtkRadioMenuItem" id="radio_menuitem_mode_jumps">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Contacts (platform or photocell)</property>
+                        <property name="label" translatable="yes">Jumps</property>
                         <property name="use_underline">True</property>
                         <property name="draw_as_radio">True</property>
                         <signal name="toggled" handler="on_radio_menuitem_mode_toggled" swapped="no"/>
                       </widget>
                     </child>
                     <child>
+                      <widget class="GtkRadioMenuItem" id="radio_menuitem_mode_runs">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Runs</property>
+                        <property name="use_underline">True</property>
+                        <property name="draw_as_radio">True</property>
+                        <property name="group">radio_menuitem_mode_jumps</property>
+                        <signal name="toggled" handler="on_radio_menuitem_mode_toggled" swapped="no"/>
+                      </widget>
+                    </child>
+                    <child>
                       <widget class="GtkRadioMenuItem" id="radio_menuitem_mode_encoder">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="label" translatable="yes">Encoder</property>
                         <property name="use_underline">True</property>
                         <property name="draw_as_radio">True</property>
-                        <property name="group">radio_menuitem_mode_contacts</property>
+                        <property name="group">radio_menuitem_mode_jumps</property>
+                        <signal name="toggled" handler="on_radio_menuitem_mode_toggled" swapped="no"/>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkRadioMenuItem" id="radio_menuitem_mode_other">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Other</property>
+                        <property name="use_underline">True</property>
+                        <property name="draw_as_radio">True</property>
+                        <property name="group">radio_menuitem_mode_jumps</property>
                         <signal name="toggled" handler="on_radio_menuitem_mode_toggled" swapped="no"/>
                       </widget>
                     </child>
@@ -263,10 +285,18 @@
               </widget>
             </child>
             <child>
-              <widget class="GtkMenuItem" id="menuitem_mode_selected_contacts">
+              <widget class="GtkMenuItem" id="menuitem_mode_selected_jumps">
                 <property name="sensitive">False</property>
                 <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Contacts  (platform or photocell)</property>
+                <property name="label" translatable="yes">Jumps</property>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="menuitem_mode_selected_runs">
+                <property name="sensitive">False</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Runs</property>
+                <property name="use_underline">True</property>
               </widget>
             </child>
             <child>
@@ -277,6 +307,14 @@
               </widget>
             </child>
             <child>
+              <widget class="GtkMenuItem" id="menuitem_mode_selected_other">
+                <property name="sensitive">False</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Other</property>
+                <property name="use_underline">True</property>
+              </widget>
+            </child>
+            <child>
               <widget class="GtkMenuItem" id="help_menuitem">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
@@ -827,21 +865,21 @@
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <child>
-                              <widget class="GtkAlignment" id="alignment31">
+                              <widget class="GtkAlignment" id="alignment17">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="top_padding">4</property>
                                 <child>
-                                  <widget class="GtkViewport" id="viewport_mode_small">
+                                  <widget class="GtkNotebook" id="notebook_sup_contacts">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="resize_mode">queue</property>
-                                    <property name="shadow_type">none</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="show_tabs">False</property>
+                                    <property name="show_border">False</property>
                                     <child>
-                                      <widget class="GtkHBox" id="hbox_radio_modes">
+                                      <widget class="GtkHBox" id="hbox82">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
-                                        <property name="spacing">8</property>
+                                        <property name="spacing">20</property>
                                         <child>
                                           <widget class="GtkRadioButton" id="radio_mode_jumps_small">
                                             <property name="visible">True</property>
@@ -852,10 +890,10 @@
                                             <property name="draw_indicator">False</property>
                                             <signal name="toggled" 
handler="on_radio_mode_jumps_small_toggled" swapped="no"/>
                                             <child>
-                                              <widget class="GtkVBox" id="vbox74">
+                                              <widget class="GtkHBox" id="hbox107">
                                                 <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
-                                                <property name="spacing">4</property>
+                                                <property name="spacing">10</property>
                                                 <child>
                                                   <widget class="GtkImage" id="image_mode_jumps_small">
                                                     <property name="visible">True</property>
@@ -872,11 +910,11 @@
                                                   <widget class="GtkLabel" id="label_mode_jumps_small">
                                                     <property name="visible">True</property>
                                                     <property name="can_focus">False</property>
-                                                    <property name="label" 
translatable="yes">Jumps</property>
+                                                    <property name="label" translatable="yes">Simple 
Jumps</property>
                                                     <property name="justify">center</property>
                                                   </widget>
                                                   <packing>
-                                                    <property name="expand">True</property>
+                                                    <property name="expand">False</property>
                                                     <property name="fill">True</property>
                                                     <property name="position">1</property>
                                                   </packing>
@@ -885,8 +923,8 @@
                                             </child>
                                           </widget>
                                           <packing>
-                                            <property name="expand">True</property>
-                                            <property name="fill">True</property>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
                                             <property name="position">0</property>
                                           </packing>
                                         </child>
@@ -896,14 +934,15 @@
                                             <property name="can_focus">True</property>
                                             <property name="receives_default">False</property>
                                             <property name="relief">none</property>
+                                            <property name="active">True</property>
                                             <property name="draw_indicator">False</property>
                                             <property name="group">radio_mode_jumps_small</property>
                                             <signal name="toggled" 
handler="on_radio_mode_jumps_reactive_small_toggled" swapped="no"/>
                                             <child>
-                                              <widget class="GtkVBox" id="vbox75">
+                                              <widget class="GtkHBox" id="hbox108">
                                                 <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
-                                                <property name="spacing">4</property>
+                                                <property name="spacing">10</property>
                                                 <child>
                                                   <widget class="GtkImage" 
id="image_mode_jumps_reactive_small">
                                                     <property name="visible">True</property>
@@ -912,7 +951,7 @@
                                                   </widget>
                                                   <packing>
                                                     <property name="expand">False</property>
-                                                    <property name="fill">True</property>
+                                                    <property name="fill">False</property>
                                                     <property name="position">0</property>
                                                   </packing>
                                                 </child>
@@ -920,13 +959,12 @@
                                                   <widget class="GtkLabel" 
id="label_mode_jumps_reactive_small">
                                                     <property name="visible">True</property>
                                                     <property name="can_focus">False</property>
-                                                    <property name="label" translatable="yes">Jumps
-multiples</property>
+                                                    <property name="label" translatable="yes">Multiple 
Jumps</property>
                                                     <property name="justify">center</property>
                                                   </widget>
                                                   <packing>
-                                                    <property name="expand">True</property>
-                                                    <property name="fill">True</property>
+                                                    <property name="expand">False</property>
+                                                    <property name="fill">False</property>
                                                     <property name="position">1</property>
                                                   </packing>
                                                 </child>
@@ -934,25 +972,44 @@ multiples</property>
                                             </child>
                                           </widget>
                                           <packing>
-                                            <property name="expand">True</property>
-                                            <property name="fill">True</property>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
                                             <property name="position">1</property>
                                           </packing>
                                         </child>
+                                      </widget>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkLabel" id="label32">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label">jumps</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="tab_fill">False</property>
+                                        <property name="type">tab</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkHBox" id="hbox110">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="spacing">20</property>
                                         <child>
                                           <widget class="GtkRadioButton" id="radio_mode_runs_small">
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
                                             <property name="receives_default">False</property>
                                             <property name="relief">none</property>
+                                            <property name="active">True</property>
                                             <property name="draw_indicator">False</property>
                                             <property name="group">radio_mode_jumps_small</property>
                                             <signal name="toggled" 
handler="on_radio_mode_runs_small_toggled" swapped="no"/>
                                             <child>
-                                              <widget class="GtkVBox" id="vbox76">
+                                              <widget class="GtkHBox" id="hbox116">
                                                 <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
-                                                <property name="spacing">4</property>
+                                                <property name="spacing">10</property>
                                                 <child>
                                                   <widget class="GtkImage" id="image_mode_runs_small">
                                                     <property name="visible">True</property>
@@ -960,7 +1017,7 @@ multiples</property>
                                                     <property name="stock">gtk-missing-image</property>
                                                   </widget>
                                                   <packing>
-                                                    <property name="expand">False</property>
+                                                    <property name="expand">True</property>
                                                     <property name="fill">True</property>
                                                     <property name="position">0</property>
                                                   </packing>
@@ -969,7 +1026,7 @@ multiples</property>
                                                   <widget class="GtkLabel" id="label_mode_runs_small">
                                                     <property name="visible">True</property>
                                                     <property name="can_focus">False</property>
-                                                    <property name="label" translatable="yes">Runs</property>
+                                                    <property name="label" translatable="yes">Simple 
Runs</property>
                                                     <property name="justify">center</property>
                                                   </widget>
                                                   <packing>
@@ -982,9 +1039,9 @@ multiples</property>
                                             </child>
                                           </widget>
                                           <packing>
-                                            <property name="expand">True</property>
-                                            <property name="fill">True</property>
-                                            <property name="position">2</property>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">0</property>
                                           </packing>
                                         </child>
                                         <child>
@@ -993,14 +1050,15 @@ multiples</property>
                                             <property name="can_focus">True</property>
                                             <property name="receives_default">False</property>
                                             <property name="relief">none</property>
+                                            <property name="active">True</property>
                                             <property name="draw_indicator">False</property>
                                             <property name="group">radio_mode_jumps_small</property>
                                             <signal name="toggled" 
handler="on_radio_mode_runs_intervallic_small_toggled" swapped="no"/>
                                             <child>
-                                              <widget class="GtkVBox" id="vbox77">
+                                              <widget class="GtkHBox" id="hbox117">
                                                 <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
-                                                <property name="spacing">4</property>
+                                                <property name="spacing">10</property>
                                                 <child>
                                                   <widget class="GtkImage" 
id="image_mode_runs_intervallic_small">
                                                     <property name="visible">True</property>
@@ -1008,7 +1066,7 @@ multiples</property>
                                                     <property name="stock">gtk-missing-image</property>
                                                   </widget>
                                                   <packing>
-                                                    <property name="expand">False</property>
+                                                    <property name="expand">True</property>
                                                     <property name="fill">True</property>
                                                     <property name="position">0</property>
                                                   </packing>
@@ -1017,8 +1075,7 @@ multiples</property>
                                                   <widget class="GtkLabel" 
id="label_mode_runs_intervallic_small">
                                                     <property name="visible">True</property>
                                                     <property name="can_focus">False</property>
-                                                    <property name="label" translatable="yes">Runs
-intervallic</property>
+                                                    <property name="label" translatable="yes">Intervallic 
Runs</property>
                                                     <property name="justify">center</property>
                                                   </widget>
                                                   <packing>
@@ -1031,25 +1088,48 @@ intervallic</property>
                                             </child>
                                           </widget>
                                           <packing>
-                                            <property name="expand">True</property>
-                                            <property name="fill">True</property>
-                                            <property name="position">3</property>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">1</property>
                                           </packing>
                                         </child>
+                                      </widget>
+                                      <packing>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkLabel" id="label34">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label">runs</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="position">1</property>
+                                        <property name="tab_fill">False</property>
+                                        <property name="type">tab</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkHBox" id="hbox115">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="spacing">20</property>
                                         <child>
                                           <widget class="GtkRadioButton" 
id="radio_mode_reaction_times_small">
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
                                             <property name="receives_default">False</property>
                                             <property name="relief">none</property>
+                                            <property name="active">True</property>
                                             <property name="draw_indicator">False</property>
                                             <property name="group">radio_mode_jumps_small</property>
                                             <signal name="toggled" 
handler="on_radio_mode_reaction_times_small_toggled" swapped="no"/>
                                             <child>
-                                              <widget class="GtkVBox" id="vbox78">
+                                              <widget class="GtkHBox" id="hbox118">
                                                 <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
-                                                <property name="spacing">4</property>
+                                                <property name="spacing">10</property>
                                                 <child>
                                                   <widget class="GtkImage" 
id="image_mode_reaction_times_small">
                                                     <property name="visible">True</property>
@@ -1057,7 +1137,7 @@ intervallic</property>
                                                     <property name="stock">gtk-missing-image</property>
                                                   </widget>
                                                   <packing>
-                                                    <property name="expand">False</property>
+                                                    <property name="expand">True</property>
                                                     <property name="fill">True</property>
                                                     <property name="position">0</property>
                                                   </packing>
@@ -1066,8 +1146,7 @@ intervallic</property>
                                                   <widget class="GtkLabel" 
id="label_mode_reaction_times_small">
                                                     <property name="visible">True</property>
                                                     <property name="can_focus">False</property>
-                                                    <property name="label" translatable="yes">Reaction
-times</property>
+                                                    <property name="label" translatable="yes">Reaction 
times</property>
                                                     <property name="justify">center</property>
                                                   </widget>
                                                   <packing>
@@ -1080,9 +1159,9 @@ times</property>
                                             </child>
                                           </widget>
                                           <packing>
-                                            <property name="expand">True</property>
-                                            <property name="fill">True</property>
-                                            <property name="position">4</property>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">0</property>
                                           </packing>
                                         </child>
                                         <child>
@@ -1091,14 +1170,15 @@ times</property>
                                             <property name="can_focus">True</property>
                                             <property name="receives_default">False</property>
                                             <property name="relief">none</property>
+                                            <property name="active">True</property>
                                             <property name="draw_indicator">False</property>
                                             <property name="group">radio_mode_jumps_small</property>
                                             <signal name="toggled" 
handler="on_radio_mode_pulses_small_toggled" swapped="no"/>
                                             <child>
-                                              <widget class="GtkVBox" id="vbox79">
+                                              <widget class="GtkHBox" id="hbox119">
                                                 <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
-                                                <property name="spacing">4</property>
+                                                <property name="spacing">10</property>
                                                 <child>
                                                   <widget class="GtkImage" id="image_mode_pulses_small">
                                                     <property name="visible">True</property>
@@ -1106,7 +1186,7 @@ times</property>
                                                     <property name="stock">gtk-missing-image</property>
                                                   </widget>
                                                   <packing>
-                                                    <property name="expand">False</property>
+                                                    <property name="expand">True</property>
                                                     <property name="fill">True</property>
                                                     <property name="position">0</property>
                                                   </packing>
@@ -1128,9 +1208,9 @@ times</property>
                                             </child>
                                           </widget>
                                           <packing>
-                                            <property name="expand">True</property>
-                                            <property name="fill">True</property>
-                                            <property name="position">5</property>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">1</property>
                                           </packing>
                                         </child>
                                         <child>
@@ -1139,14 +1219,15 @@ times</property>
                                             <property name="can_focus">True</property>
                                             <property name="receives_default">False</property>
                                             <property name="relief">none</property>
+                                            <property name="active">True</property>
                                             <property name="draw_indicator">False</property>
                                             <property name="group">radio_mode_jumps_small</property>
                                             <signal name="toggled" 
handler="on_radio_mode_multi_chronopic_small_toggled" swapped="no"/>
                                             <child>
-                                              <widget class="GtkVBox" id="vbox80">
+                                              <widget class="GtkHBox" id="hbox120">
                                                 <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
-                                                <property name="spacing">4</property>
+                                                <property name="spacing">10</property>
                                                 <child>
                                                   <widget class="GtkImage" 
id="image_mode_multi_chronopic_small">
                                                     <property name="visible">True</property>
@@ -1154,7 +1235,7 @@ times</property>
                                                     <property name="stock">gtk-missing-image</property>
                                                   </widget>
                                                   <packing>
-                                                    <property name="expand">False</property>
+                                                    <property name="expand">True</property>
                                                     <property name="fill">True</property>
                                                     <property name="position">0</property>
                                                   </packing>
@@ -1163,8 +1244,7 @@ times</property>
                                                   <widget class="GtkLabel" 
id="label_mode_multi_chronopic_small">
                                                     <property name="visible">True</property>
                                                     <property name="can_focus">False</property>
-                                                    <property name="label" translatable="yes">Multi-
-Chronopic</property>
+                                                    <property name="label" 
translatable="yes">MultiChronopic</property>
                                                     <property name="justify">center</property>
                                                   </widget>
                                                   <packing>
@@ -1177,12 +1257,27 @@ Chronopic</property>
                                             </child>
                                           </widget>
                                           <packing>
-                                            <property name="expand">True</property>
-                                            <property name="fill">True</property>
-                                            <property name="position">6</property>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">2</property>
                                           </packing>
                                         </child>
                                       </widget>
+                                      <packing>
+                                        <property name="position">2</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkLabel" id="label49">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label">other</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="position">2</property>
+                                        <property name="tab_fill">False</property>
+                                        <property name="type">tab</property>
+                                      </packing>
                                     </child>
                                   </widget>
                                 </child>
@@ -5545,6 +5640,12 @@ Second Chronopic to platforms.</property>
                                                     <child>
                                                       <placeholder/>
                                                     </child>
+                                                    <child>
+                                                      <placeholder/>
+                                                    </child>
+                                                    <child>
+                                                      <placeholder/>
+                                                    </child>
                                                   </widget>
                                                   <packing>
                                                     <property name="expand">True</property>
@@ -6149,6 +6250,12 @@ Second Chronopic to platforms.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             </child>
                                                             <child>
@@ -6887,6 +6994,12 @@ Second Chronopic to platforms.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="position">2</property>
@@ -7384,6 +7497,12 @@ Second Chronopic to platforms.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="position">4</property>
@@ -14123,36 +14242,94 @@ Evaluator can use real name or nickname.</property>
                                             <property name="can_focus">False</property>
                                             <property name="left_padding">20</property>
                                             <child>
-                                              <widget class="GtkVBox" id="vbox87">
+                                              <widget class="GtkTable" id="table11">
                                                 <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
-                                                <property name="spacing">20</property>
+                                                <property name="n_rows">2</property>
+                                                <property name="n_columns">2</property>
+                                                <property name="column_spacing">20</property>
+                                                <property name="row_spacing">20</property>
+                                                <property name="homogeneous">True</property>
+                                                <child>
+                                                  <widget class="GtkButton" id="button_selector_start_jumps">
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">True</property>
+                                                    <property name="receives_default">True</property>
+                                                    <signal name="clicked" 
handler="on_button_selector_start_jumps_clicked" swapped="no"/>
+                                                    <child>
+                                                      <widget class="GtkLabel" id="label59">
+                                                        <property name="visible">True</property>
+                                                        <property name="can_focus">False</property>
+                                                        <property name="xpad">8</property>
+                                                        <property name="ypad">8</property>
+                                                        <property name="label" 
translatable="yes">Jumps</property>
+                                                      </widget>
+                                                    </child>
+                                                  </widget>
+                                                </child>
                                                 <child>
-                                                  <widget class="GtkButton" 
id="button_selector_start_contacts">
-                                                    <property name="label" translatable="yes">Contacts 
(platform or photocell)</property>
+                                                  <widget class="GtkButton" id="button_selector_start_runs">
                                                     <property name="visible">True</property>
                                                     <property name="can_focus">True</property>
                                                     <property name="receives_default">True</property>
-                                                    <signal name="clicked" 
handler="on_button_selector_start_contacts_clicked" swapped="no"/>
+                                                    <signal name="clicked" 
handler="on_button_selector_start_runs_clicked" swapped="no"/>
+                                                    <child>
+                                                      <widget class="GtkLabel" id="label52">
+                                                        <property name="visible">True</property>
+                                                        <property name="can_focus">False</property>
+                                                        <property name="xpad">8</property>
+                                                        <property name="ypad">8</property>
+                                                        <property name="label" 
translatable="yes">Runs</property>
+                                                      </widget>
+                                                    </child>
                                                   </widget>
                                                   <packing>
-                                                    <property name="expand">True</property>
-                                                    <property name="fill">True</property>
-                                                    <property name="position">0</property>
+                                                    <property name="left_attach">1</property>
+                                                    <property name="right_attach">2</property>
+                                                  </packing>
+                                                </child>
+                                                <child>
+                                                  <widget class="GtkButton" id="button_selector_start_other">
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">True</property>
+                                                    <property name="receives_default">True</property>
+                                                    <signal name="clicked" 
handler="on_button_selector_start_other_clicked" swapped="no"/>
+                                                    <child>
+                                                      <widget class="GtkLabel" id="label51">
+                                                        <property name="visible">True</property>
+                                                        <property name="can_focus">False</property>
+                                                        <property name="xpad">8</property>
+                                                        <property name="ypad">8</property>
+                                                        <property name="label" 
translatable="yes">Other</property>
+                                                      </widget>
+                                                    </child>
+                                                  </widget>
+                                                  <packing>
+                                                    <property name="left_attach">1</property>
+                                                    <property name="right_attach">2</property>
+                                                    <property name="top_attach">1</property>
+                                                    <property name="bottom_attach">2</property>
                                                   </packing>
                                                 </child>
                                                 <child>
                                                   <widget class="GtkButton" 
id="button_selector_start_encoder">
-                                                    <property name="label" 
translatable="yes">Encoder</property>
                                                     <property name="visible">True</property>
                                                     <property name="can_focus">True</property>
                                                     <property name="receives_default">True</property>
                                                     <signal name="clicked" 
handler="on_button_selector_start_encoder_clicked" swapped="no"/>
+                                                    <child>
+                                                      <widget class="GtkLabel" id="label50">
+                                                        <property name="visible">True</property>
+                                                        <property name="can_focus">False</property>
+                                                        <property name="xpad">8</property>
+                                                        <property name="ypad">8</property>
+                                                        <property name="label" 
translatable="yes">Encoder</property>
+                                                      </widget>
+                                                    </child>
                                                   </widget>
                                                   <packing>
-                                                    <property name="expand">True</property>
-                                                    <property name="fill">True</property>
-                                                    <property name="position">1</property>
+                                                    <property name="top_attach">1</property>
+                                                    <property name="bottom_attach">2</property>
                                                   </packing>
                                                 </child>
                                               </widget>
@@ -16731,6 +16908,12 @@ by you</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -17136,6 +17319,12 @@ by you</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -17960,6 +18149,18 @@ by you</property>
             <child>
               <placeholder/>
             </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
           </widget>
           <packing>
             <property name="expand">True</property>
@@ -25435,6 +25636,42 @@ options</property>
                             <child>
                               <placeholder/>
                             </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
                           </widget>
                         </child>
                       </widget>
@@ -27229,6 +27466,12 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                                 <child>
                                   <placeholder/>
                                 </child>
+                                <child>
+                                  <placeholder/>
+                                </child>
+                                <child>
+                                  <placeholder/>
+                                </child>
                               </widget>
                             </child>
                           </widget>
@@ -27693,6 +27936,12 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -29617,6 +29866,12 @@ show elevation as:</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                       <packing>
                         <property name="left_attach">2</property>
@@ -29686,6 +29941,12 @@ show elevation as:</property>
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
@@ -29770,6 +30031,12 @@ show elevation as:</property>
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index b1860d1..40907c3 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -38,14 +38,20 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.Window app1;
        [Widget] Gtk.MenuBar main_menu;
        [Widget] Gtk.MenuItem menuitem_mode;
-       [Widget] Gtk.RadioMenuItem radio_menuitem_mode_contacts;
+       
+       [Widget] Gtk.RadioMenuItem radio_menuitem_mode_jumps;
+       [Widget] Gtk.RadioMenuItem radio_menuitem_mode_runs;
        [Widget] Gtk.RadioMenuItem radio_menuitem_mode_encoder;
-       [Widget] Gtk.MenuItem menuitem_mode_selected_contacts;
+       [Widget] Gtk.RadioMenuItem radio_menuitem_mode_other;
+
+       [Widget] Gtk.MenuItem menuitem_mode_selected_jumps;
+       [Widget] Gtk.MenuItem menuitem_mode_selected_runs;
        [Widget] Gtk.MenuItem menuitem_mode_selected_encoder;
+       [Widget] Gtk.MenuItem menuitem_mode_selected_other;
        [Widget] Gtk.Notebook notebook_sup;
+       [Widget] Gtk.Notebook notebook_sup_contacts;
 
        //gui for small screens
-       [Widget] Gtk.Viewport viewport_mode_small;
        [Widget] Gtk.RadioButton radio_mode_jumps_small;
        [Widget] Gtk.RadioButton radio_mode_jumps_reactive_small;
        [Widget] Gtk.RadioButton radio_mode_runs_small;
@@ -630,7 +636,6 @@ public partial class ChronoJumpWindow
                /*
                 * gui for small screens
                 */
-               //viewport_mode_small.ModifyBg(StateType.Normal, UtilGtk.WHITE);
 
                UtilGtk.ColorsMenuLabel(viewport_chronopics, label_mode_jumps_small);
                UtilGtk.ColorsMenuLabel(viewport_chronopics, label_mode_jumps_reactive_small);
@@ -2964,31 +2969,61 @@ public partial class ChronoJumpWindow
                }
        }
 
+       
+       enum menuitem_modes { JUMPS, RUNS, ENCODER, OTHER }
+       private void select_menuitem_mode_toggled(menuitem_modes m) 
+       {
+               menuitem_mode_selected_jumps.Visible = false;
+               menuitem_mode_selected_runs.Visible = false;
+               menuitem_mode_selected_encoder.Visible = false;
+               menuitem_mode_selected_other.Visible = false;
 
-       private void on_radio_menuitem_mode_toggled(object o, EventArgs args) {
-               if(radio_menuitem_mode_contacts.Active) {
-                       //menuitem_mode = new MenuItem(Catalog.GetString("Mode") + ": " + 
Catalog.GetString("Contacts (platform or photocell)"));
+               if(m == menuitem_modes.JUMPS) {
                        notebook_sup.CurrentPage = 0;
-                       menuitem_mode_selected_contacts.Visible = true;
-                       menuitem_mode_selected_encoder.Visible = false;
-               } else {
-                       //menuitem_mode = new MenuItem(Catalog.GetString("Mode") + ": " + 
Catalog.GetString("Encoder"));
+                       notebook_sup_contacts.CurrentPage = 0;
+                       menuitem_mode_selected_jumps.Visible = true;
+                       radio_mode_jumps_small.Active = true;
+               } else if(m == menuitem_modes.RUNS) {
+                       notebook_sup.CurrentPage = 0;
+                       notebook_sup_contacts.CurrentPage = 1;
+                       menuitem_mode_selected_runs.Visible = true;
+                       radio_mode_runs_small.Active = true;
+               } else if(m == menuitem_modes.ENCODER) {
                        notebook_sup.CurrentPage = 1;
-                       menuitem_mode_selected_contacts.Visible = false;
                        menuitem_mode_selected_encoder.Visible = true;
+               } else {        //m == menuitem_modes.OTHER (contacts / other)
+                       notebook_sup.CurrentPage = 0;
+                       notebook_sup_contacts.CurrentPage = 2;
+                       menuitem_mode_selected_other.Visible = true;
+                       radio_mode_reaction_times_small.Active = true;
                }
        }
-       private void on_button_selector_start_contacts_clicked(object o, EventArgs args) {
-               //menuitem_mode = new MenuItem(Catalog.GetString("Mode") + ": " + Catalog.GetString("Contacts 
(platform or photocell)"));
-               notebook_sup.CurrentPage = 0;
-               menuitem_mode_selected_contacts.Visible = true;
-               menuitem_mode_selected_encoder.Visible = false;
+
+       private void on_radio_menuitem_mode_toggled(object o, EventArgs args) 
+       {
+               menuitem_modes m;
+               if(radio_menuitem_mode_jumps.Active)
+                       m = menuitem_modes.JUMPS;
+               else if(radio_menuitem_mode_runs.Active)
+                       m = menuitem_modes.RUNS;
+               else if(radio_menuitem_mode_encoder.Active)
+                       m = menuitem_modes.ENCODER;
+               else // if(radio_menuitem_mode_other.Active)
+                       m = menuitem_modes.OTHER;
+
+               select_menuitem_mode_toggled(m);
+       }
+       private void on_button_selector_start_jumps_clicked(object o, EventArgs args) {
+               select_menuitem_mode_toggled(menuitem_modes.JUMPS);
+       }
+       private void on_button_selector_start_runs_clicked(object o, EventArgs args) {
+               select_menuitem_mode_toggled(menuitem_modes.RUNS);
        }
        private void on_button_selector_start_encoder_clicked(object o, EventArgs args) {
-               //menuitem_mode = new MenuItem(Catalog.GetString("Mode") + ": " + 
Catalog.GetString("Encoder"));
-               notebook_sup.CurrentPage = 1;
-               menuitem_mode_selected_contacts.Visible = false;
-               menuitem_mode_selected_encoder.Visible = true;
+               select_menuitem_mode_toggled(menuitem_modes.ENCODER);
+       }
+       private void on_button_selector_start_other_clicked(object o, EventArgs args) {
+               select_menuitem_mode_toggled(menuitem_modes.OTHER);
        }
        
 
@@ -5967,8 +6002,9 @@ Console.WriteLine("X");
        
        private void sensitiveGuiEventDoing () {
                session_menuitem.Sensitive = false;
+               menuitem_mode.Sensitive = false;
+               notebook_sup_contacts.Sensitive = false;
                help_menuitem.Sensitive = false;
-               viewport_mode_small.Sensitive = false;
                frame_persons.Sensitive = false;
                
                button_execute_test.Sensitive = false;
@@ -5997,8 +6033,9 @@ Console.WriteLine("X");
                Log.Write(" sensitiveGuiEventDone start ");
 
                session_menuitem.Sensitive = true;
+               menuitem_mode.Sensitive = true;
+               notebook_sup_contacts.Sensitive = true;
                help_menuitem.Sensitive = true;
-               viewport_mode_small.Sensitive = true;
                frame_persons.Sensitive = true;
 
                button_execute_test.Sensitive = true;
@@ -6051,7 +6088,6 @@ Console.WriteLine("X");
                session_menuitem.Sensitive      = ! start;
                menuitem_mode.Sensitive         = ! start;
                help_menuitem.Sensitive         = ! start;
-               viewport_mode_small.Sensitive   = ! start;
                frame_persons.Sensitive         = ! start;
 
                hbox_jumps_test.Visible         = ! start;


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