[chronojump] Jumps general statistics renamed Advanced and moved at end



commit 9e15911d12422cbc7243fff9fe6fd5d1f807cb42
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Jan 7 18:02:36 2020 +0100

    Jumps general statistics renamed Advanced and moved at end

 glade/app1.glade             | 148 ++++++++++++++++++++++---------------------
 src/gui/app1/chronojump.cs   |  24 +++----
 src/gui/app1/jumpsProfile.cs |   3 +-
 src/gui/jumpsProfile.cs      |   1 +
 4 files changed, 92 insertions(+), 84 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 20517d33..b815caa9 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -5016,66 +5016,13 @@ EncoderInertialCapture</property>
                                                     <property name="position">2</property>
                                                   </packing>
                                                 </child>
-                                                <child>
-                                                  <widget class="GtkAlignment" id="alignment29">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <child>
-                                                      <widget class="GtkRadioButton" 
id="radio_mode_contacts_general">
-                                                        <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>
-                                                        <signal name="toggled" 
handler="on_radio_mode_contacts_general_toggled" swapped="no"/>
-                                                        <child>
-                                                          <widget class="GtkHBox" id="hbox50">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="spacing">10</property>
-                                                            <child>
-                                                            <widget class="GtkImage" 
id="image_tests_analyze_general">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property 
name="stock">gtk-missing-image</property>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
-                                                            <widget class="GtkLabel" 
id="label_mode_contacts_jumps_profile1">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="label" 
translatable="yes">General</property>
-                                                            <property name="justify">center</property>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="position">1</property>
-                                                            </packing>
-                                                            </child>
-                                                          </widget>
-                                                        </child>
-                                                      </widget>
-                                                    </child>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
-                                                    <property name="position">3</property>
-                                                  </packing>
-                                                </child>
                                                 <child>
                                                   <widget class="GtkRadioButton" 
id="radio_mode_contacts_jumps_profile">
                                                     <property name="can_focus">True</property>
                                                     <property name="receives_default">False</property>
                                                     <property name="relief">none</property>
                                                     <property name="draw_indicator">False</property>
-                                                    <property 
name="group">radio_mode_contacts_general</property>
+                                                    <property 
name="group">radio_mode_contacts_jumps_advanced</property>
                                                     <signal name="toggled" 
handler="on_radio_mode_contacts_jumps_profile_toggled" swapped="no"/>
                                                     <child>
                                                       <widget class="GtkHBox" id="hbox199">
@@ -5113,7 +5060,7 @@ EncoderInertialCapture</property>
                                                   <packing>
                                                     <property name="expand">False</property>
                                                     <property name="fill">False</property>
-                                                    <property name="position">4</property>
+                                                    <property name="position">3</property>
                                                   </packing>
                                                 </child>
                                                 <child>
@@ -5122,7 +5069,7 @@ EncoderInertialCapture</property>
                                                     <property name="receives_default">False</property>
                                                     <property name="relief">none</property>
                                                     <property name="draw_indicator">False</property>
-                                                    <property 
name="group">radio_mode_contacts_general</property>
+                                                    <property 
name="group">radio_mode_contacts_jumps_advanced</property>
                                                     <signal name="toggled" 
handler="on_radio_mode_contacts_jumps_dj_optimal_fall_toggled" swapped="no"/>
                                                     <child>
                                                       <widget class="GtkHBox" id="hbox174">
@@ -5160,7 +5107,7 @@ EncoderInertialCapture</property>
                                                   <packing>
                                                     <property name="expand">False</property>
                                                     <property name="fill">False</property>
-                                                    <property name="position">5</property>
+                                                    <property name="position">4</property>
                                                   </packing>
                                                 </child>
                                                 <child>
@@ -5169,7 +5116,7 @@ EncoderInertialCapture</property>
                                                     <property name="receives_default">False</property>
                                                     <property name="relief">none</property>
                                                     <property name="draw_indicator">False</property>
-                                                    <property 
name="group">radio_mode_contacts_general</property>
+                                                    <property 
name="group">radio_mode_contacts_jumps_advanced</property>
                                                     <signal name="toggled" 
handler="on_radio_mode_contacts_jumps_weight_fv_profile_toggled" swapped="no"/>
                                                     <child>
                                                       <widget class="GtkHBox" id="hbox230">
@@ -5204,6 +5151,59 @@ EncoderInertialCapture</property>
                                                       </widget>
                                                     </child>
                                                   </widget>
+                                                  <packing>
+                                                    <property name="expand">False</property>
+                                                    <property name="fill">False</property>
+                                                    <property name="position">5</property>
+                                                  </packing>
+                                                </child>
+                                                <child>
+                                                  <widget class="GtkAlignment" id="alignment29">
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">False</property>
+                                                    <child>
+                                                      <widget class="GtkRadioButton" 
id="radio_mode_contacts_jumps_advanced">
+                                                        <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>
+                                                        <signal name="toggled" 
handler="on_radio_mode_contacts_jumps_advanced_toggled" swapped="no"/>
+                                                        <child>
+                                                          <widget class="GtkHBox" id="hbox50">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">10</property>
+                                                            <child>
+                                                            <widget class="GtkImage" 
id="image_tests_analyze_general">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property 
name="stock">gtk-missing-image</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkLabel" 
id="label_mode_contacts_jumps_profile1">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" 
translatable="yes">Advanced</property>
+                                                            <property name="justify">center</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                          </widget>
+                                                        </child>
+                                                      </widget>
+                                                    </child>
+                                                  </widget>
                                                   <packing>
                                                     <property name="expand">False</property>
                                                     <property name="fill">False</property>
@@ -5216,7 +5216,7 @@ EncoderInertialCapture</property>
                                                     <property name="receives_default">False</property>
                                                     <property name="relief">none</property>
                                                     <property name="draw_indicator">False</property>
-                                                    <property 
name="group">radio_mode_contacts_general</property>
+                                                    <property 
name="group">radio_mode_contacts_jumps_advanced</property>
                                                     <signal name="toggled" 
handler="on_radio_mode_contacts_sprint_toggled" swapped="no"/>
                                                     <child>
                                                       <widget class="GtkHBox" id="hbox206">
@@ -22559,6 +22559,9 @@ Concentric</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -24806,6 +24809,18 @@ Concentric</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">6</property>
                                                             <child>
+                                                            <widget class="GtkLabel" 
id="label_video_encoder_tests_will_be_filmed">
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" translatable="yes">Tests 
will be filmed</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="pack_type">end</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
                                                             <widget class="GtkHBox" 
id="hbox_video_encoder_capturing">
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">4</property>
@@ -24842,18 +24857,6 @@ Concentric</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkLabel" 
id="label_video_encoder_tests_will_be_filmed">
-                                                            <property name="can_focus">False</property>
-                                                            <property name="label" translatable="yes">Tests 
will be filmed</property>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="pack_type">end</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
                                                             <widget class="GtkHBox" 
id="hbox_video_encoder_no_capturing">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
@@ -32077,6 +32080,9 @@ then click this button.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 2d3474a0..eda00f9b 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -90,10 +90,10 @@ public partial class ChronoJumpWindow
 
        //radio group
        [Widget] Gtk.Arrow arrow_contacts_sup_capture_analyze;
-       [Widget] Gtk.RadioButton radio_mode_contacts_general;
        [Widget] Gtk.RadioButton radio_mode_contacts_jumps_profile;
        [Widget] Gtk.RadioButton radio_mode_contacts_jumps_dj_optimal_fall;
        [Widget] Gtk.RadioButton radio_mode_contacts_jumps_weight_fv_profile;
+       [Widget] Gtk.RadioButton radio_mode_contacts_jumps_advanced;
        [Widget] Gtk.RadioButton radio_mode_contacts_sprint;
 
        [Widget] Gtk.Label label_sprint_person_name;
@@ -3105,12 +3105,12 @@ public partial class ChronoJumpWindow
 
                button_contacts_bells.Sensitive = false;
                radio_mode_contacts_capture.Active = true;
-               radio_mode_contacts_general.Active = true;
+               radio_mode_contacts_jumps_profile.Active = true;
                arrow_contacts_sup_capture_analyze.Visible = false;
-               radio_mode_contacts_general.Visible = false;
                radio_mode_contacts_jumps_profile.Visible = false;
                radio_mode_contacts_jumps_dj_optimal_fall.Visible = false;
                radio_mode_contacts_jumps_weight_fv_profile.Visible = false;
+               radio_mode_contacts_jumps_advanced.Visible = false;
                radio_mode_contacts_sprint.Visible = false;
                notebook_analyze.CurrentPage = Convert.ToInt32(notebook_analyze_pages.STATISTICS);
                button_inspect_last_test_run_intervallic.Visible = false;
@@ -3153,10 +3153,10 @@ public partial class ChronoJumpWindow
                                if(radio_mode_contacts_analyze.Active)
                                {
                                        arrow_contacts_sup_capture_analyze.Visible = true;
-                                       radio_mode_contacts_general.Visible = true;
                                        radio_mode_contacts_jumps_profile.Visible = true;
                                        radio_mode_contacts_jumps_dj_optimal_fall.Visible = true;
                                        radio_mode_contacts_jumps_weight_fv_profile.Visible = true;
+                                       radio_mode_contacts_jumps_advanced.Visible = true;
                                }
                        } else {
                                notebooks_change(m);
@@ -3198,7 +3198,7 @@ public partial class ChronoJumpWindow
                                if(radio_mode_contacts_analyze.Active)
                                {
                                        arrow_contacts_sup_capture_analyze.Visible = true;
-                                       radio_mode_contacts_general.Visible = true;
+                                       radio_mode_contacts_jumps_advanced.Visible = true;
                                        radio_mode_contacts_sprint.Visible = true;
                                }
                        }
@@ -7045,10 +7045,10 @@ LogB.Debug("mc finished 5");
                        return;
 
                arrow_contacts_sup_capture_analyze.Visible = false;
-               radio_mode_contacts_general.Visible = false;
                radio_mode_contacts_jumps_profile.Visible = false;
                radio_mode_contacts_jumps_dj_optimal_fall.Visible = false;
                radio_mode_contacts_jumps_weight_fv_profile.Visible = false;
+               radio_mode_contacts_jumps_advanced.Visible = false;
                radio_mode_contacts_sprint.Visible = false;
 
                notebook_capture_analyze.CurrentPage = 0;
@@ -7062,7 +7062,7 @@ LogB.Debug("mc finished 5");
                                current_menuitem_mode == Constants.Menuitem_modes.RUNSINTERVALLIC)
                {
                        arrow_contacts_sup_capture_analyze.Visible = true;
-                       radio_mode_contacts_general.Visible = true;
+                       radio_mode_contacts_jumps_advanced.Visible = true;
 
                        if(current_menuitem_mode == Constants.Menuitem_modes.JUMPSSIMPLE)
                        {
@@ -7100,11 +7100,6 @@ LogB.Debug("mc finished 5");
                notebook_capture_analyze.CurrentPage = 1;
        }
 
-       private void on_radio_mode_contacts_general_toggled (object o, EventArgs args)
-       {
-               if(radio_mode_contacts_general.Active)
-                       notebook_analyze.CurrentPage = Convert.ToInt32(notebook_analyze_pages.STATISTICS);
-       }
        private void on_radio_mode_contacts_jumps_profile_toggled (object o, EventArgs args)
        {
                if(radio_mode_contacts_jumps_profile.Active)
@@ -7129,6 +7124,11 @@ LogB.Debug("mc finished 5");
                        jumpsWeightFVProfileDo(true);
                }
        }
+       private void on_radio_mode_contacts_jumps_advanced_toggled (object o, EventArgs args)
+       {
+               if(radio_mode_contacts_jumps_advanced.Active)
+                       notebook_analyze.CurrentPage = Convert.ToInt32(notebook_analyze_pages.STATISTICS);
+       }
        private void on_radio_mode_contacts_sprint_toggled (object o, EventArgs args)
        {
                if(radio_mode_contacts_sprint.Active)
diff --git a/src/gui/app1/jumpsProfile.cs b/src/gui/app1/jumpsProfile.cs
index e677ca5e..5877ea4f 100644
--- a/src/gui/app1/jumpsProfile.cs
+++ b/src/gui/app1/jumpsProfile.cs
@@ -48,7 +48,8 @@ public partial class ChronoJumpWindow
 
        private void jumpsProfileDo (bool calculateData)
        {
-               if(currentPerson == null || currentSession == null)
+               if(currentPerson == null || currentSession == null ||
+                               drawingarea_jumps_profile == null) //it happens at start on click on analyze
                        return;
                
                if(jumpsProfile == null) {
diff --git a/src/gui/jumpsProfile.cs b/src/gui/jumpsProfile.cs
index b4e68bc1..da4e94f1 100644
--- a/src/gui/jumpsProfile.cs
+++ b/src/gui/jumpsProfile.cs
@@ -55,6 +55,7 @@ public static class JumpsProfileGraph
 
        public static void Do (List<JumpsProfileIndex> l_jpi, DrawingArea area, string title, string date)
        {
+               //LogB.Information(string.Format("is area null: {0}", (area == null)));
                //1 create context
                Cairo.Context g = Gdk.CairoHelper.Create (area.GdkWindow);
                


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