[chronojump] sprint has it's own notebook page on runs inertial



commit 16a01060240451a5dfd4b1c6d6f9647419d765d2
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Mar 16 23:43:40 2017 +0100

    sprint has it's own notebook page on runs inertial

 glade/app1.glade      |   43 +++++++++++++++++++++++++++++++++++++++++--
 src/gui/chronojump.cs |   18 +++++++++++++++---
 src/sprint.cs         |    5 ++++-
 3 files changed, 60 insertions(+), 6 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 241e200..13648f2 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -13580,6 +13580,42 @@ Concentric</property>
                                                 <property name="type">tab</property>
                                               </packing>
                                             </child>
+                                            <child>
+                                              <widget class="GtkHButtonBox" id="hbuttonbox9">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="border_width">10</property>
+                                                <child>
+                                                  <widget class="GtkButton" id="button_sprint">
+                                                    <property name="label">Sprint</property>
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">True</property>
+                                                    <property name="receives_default">True</property>
+                                                    <signal name="clicked" 
handler="on_button_sprint_clicked" swapped="no"/>
+                                                  </widget>
+                                                  <packing>
+                                                    <property name="expand">False</property>
+                                                    <property name="fill">False</property>
+                                                    <property name="position">0</property>
+                                                  </packing>
+                                                </child>
+                                              </widget>
+                                              <packing>
+                                                <property name="position">3</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkLabel" id="label140">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label">Sprint</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="position">3</property>
+                                                <property name="tab_fill">False</property>
+                                                <property name="type">tab</property>
+                                              </packing>
+                                            </child>
                                           </widget>
                                           <packing>
                                             <property name="expand">True</property>
@@ -14016,8 +14052,8 @@ Concentric</property>
                                                           </packing>
                                                         </child>
                                                         <child>
-                                                         <widget class="GtkLabel" 
id="label_encoder_selected">
-                                                           <property name="visible">True</property>
+                                                          <widget class="GtkLabel" 
id="label_encoder_selected">
+                                                            <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                           </widget>
                                                           <packing>
@@ -19397,6 +19433,9 @@ then click this button.</property>
                                                             <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 fb5cf95..e628084 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -640,9 +640,6 @@ public partial class ChronoJumpWindow
                pingThread.Start();
 
                //moveStartTestInitial();
-
-               //test calling sprint.R file
-               //new Sprint();
        }
 
 
@@ -2787,6 +2784,7 @@ public partial class ChronoJumpWindow
                                hbox_results_legend.Visible = false;
                                notebook_capture_analyze.GetNthPage(2).Hide(); //hide jumpsProfile on jumps 
reactive
                        }
+                       notebook_capture_analyze.GetNthPage(3).Hide(); //hide sprint page
                }
                else if(m == Constants.Menuitem_modes.RUNSSIMPLE || m == 
Constants.Menuitem_modes.RUNSINTERVALLIC)
                {
@@ -2799,6 +2797,7 @@ public partial class ChronoJumpWindow
                                notebooks_change(2);
                                on_extra_window_runs_test_changed(new object(), new EventArgs());
                                hbox_results_legend.Visible = true;
+                               notebook_capture_analyze.GetNthPage(3).Hide(); //hide sprint page
                        }
                        else
                        {
@@ -2806,6 +2805,7 @@ public partial class ChronoJumpWindow
                                notebooks_change(3);
                                on_extra_window_runs_interval_test_changed(new object(), new EventArgs());
                                hbox_results_legend.Visible = false;
+                               notebook_capture_analyze.GetNthPage(3).Show(); //show sprint page
                        }
                        notebook_capture_analyze.GetNthPage(2).Hide(); //hide jumpsProfile on runs
                }
@@ -6289,6 +6289,12 @@ LogB.Debug("X");
        }
 
 
+       private void on_button_sprint_clicked (object o, EventArgs args)
+       {
+               //test calling sprint.R file
+               new Sprint();
+       }
+
        /* ---------------------------------------------------------
         * ----------------  SENSITIVE GUI METHODS-------------------
         *  --------------------------------------------------------
@@ -6442,6 +6448,8 @@ LogB.Debug("X");
                notebook_capture_analyze.GetNthPage(1).Hide();
                if(radio_menuitem_mode_jumps_simple.Active)
                        notebook_capture_analyze.GetNthPage(2).Hide();
+               else if(radio_menuitem_mode_runs_intervallic.Active)
+                       notebook_capture_analyze.GetNthPage(3).Hide();
                
                
                help_menuitem.Sensitive = false;
@@ -6493,6 +6501,8 @@ LogB.Debug("X");
                notebook_capture_analyze.GetNthPage(1).Show();
                if(radio_menuitem_mode_jumps_simple.Active)
                        notebook_capture_analyze.GetNthPage(2).Show();
+               else if(radio_menuitem_mode_runs_intervallic.Active)
+                       notebook_capture_analyze.GetNthPage(3).Show();
 
                help_menuitem.Sensitive = true;
 
@@ -6615,6 +6625,8 @@ LogB.Debug("X");
                notebook_capture_analyze.GetNthPage(1).Visible = ! start;
                if(radio_menuitem_mode_jumps_simple.Active)
                        notebook_capture_analyze.GetNthPage(2).Visible = ! start;
+               else if(radio_menuitem_mode_runs_intervallic.Active)
+                       notebook_capture_analyze.GetNthPage(3).Visible = ! start;
 
                //when start, put button delete_last_test as not sensitive
                //(just for the test previous to the auto process)
diff --git a/src/sprint.cs b/src/sprint.cs
index f78980c..9b3dd26 100644
--- a/src/sprint.cs
+++ b/src/sprint.cs
@@ -30,8 +30,11 @@ public class Sprint
                parameters.Insert(0, "\"" + UtilEncoder.GetScriptSprint() + "\"");
 
                LogB.Information("\nCalling sprint.R ----->");
-               ExecuteProcess.Result execute_result = ExecuteProcess.run (executable, parameters);
+
+               //ExecuteProcess.Result execute_result = ExecuteProcess.run (executable, parameters);
                //LogB.Information("Result = " + execute_result.stdout);
+               ExecuteProcess.run (executable, parameters);
+
                LogB.Information("\n<------ Done calling sprint.R.");
        }
 }


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