[chronojump] Button forceSensor/raceAnalyzer recalculate moved to exercise options



commit 17c6a122e516aaaff0e5ae6e2420bed933fa22d7
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Apr 1 17:31:55 2020 +0200

    Button forceSensor/raceAnalyzer recalculate moved to exercise options

 glade/app1.glade                 | 70 +++++++++++++++++++++++++++-------------
 src/gui/app1/chronojump.cs       |  2 +-
 src/gui/app1/contactsExercise.cs |  6 ++++
 src/gui/app1/forceSensor.cs      |  8 ++---
 src/gui/runEncoder.cs            | 13 +++-----
 5 files changed, 64 insertions(+), 35 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index b7f55cea..ac183163 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -7003,26 +7003,7 @@ EncoderInertialCapture</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">8</property>
                                                             <child>
-                                                            <widget class="GtkButton" 
id="button_contacts_recalculate">
-                                                            <property name="visible">True</property>
-                                                            <property name="sensitive">False</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property name="receives_default">True</property>
-                                                            <property name="tooltip" 
translatable="yes">Recalculate set with changed parameters</property>
-                                                            <signal name="clicked" 
handler="on_button_contacts_recalculate_clicked" swapped="no"/>
-                                                            <child>
-                                                            <widget class="GtkImage" 
id="image_contacts_recalculate">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property 
name="stock">gtk-missing-image</property>
-                                                            </widget>
-                                                            </child>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">True</property>
-                                                            <property name="fill">True</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
+                                                            <placeholder/>
                                                             </child>
                                                             <child>
                                                             <widget class="GtkButton" 
id="button_contacts_capture_load">
@@ -16893,7 +16874,7 @@ Resisted race analyzer</property>
                                                             <widget class="GtkHBox" id="hbox52">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="spacing">30</property>
+                                                            <property name="spacing">25</property>
                                                             <child>
                                                             <widget class="GtkButton" id="button_1">
                                                             <property name="visible">True</property>
@@ -16946,7 +16927,6 @@ Resisted race analyzer</property>
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="receives_default">True</property>
-                                                            <property name="tooltip" 
translatable="yes">Close</property>
                                                             <property name="relief">half</property>
                                                             <signal name="clicked" 
handler="on_button_contacts_exercise_close_and_capture_clicked" swapped="no"/>
                                                             <accelerator key="Escape" signal="clicked"/>
@@ -16988,6 +16968,52 @@ Resisted race analyzer</property>
                                                             <property name="position">1</property>
                                                             </packing>
                                                             </child>
+                                                            <child>
+                                                            <widget class="GtkButton" 
id="button_contacts_exercise_close_and_recalculate">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <property name="relief">half</property>
+                                                            <signal name="clicked" 
handler="on_button_contacts_exercise_close_and_recalculate_clicked" swapped="no"/>
+                                                            <accelerator key="Escape" signal="clicked"/>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox368">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">8</property>
+                                                            <child>
+                                                            <widget class="GtkImage" 
id="image_contacts_recalculate">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property 
name="stock">gtk-missing-image</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkLabel" id="label478">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" translatable="yes">Close 
and recalculate</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">2</property>
+                                                            </packing>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="type">label_item</property>
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index e16d2598..3cca3cd7 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -235,7 +235,7 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.Notebook notebook_contacts_capture_doing_wait;
        [Widget] Gtk.Button button_contacts_bells;
        [Widget] Gtk.Button button_contacts_capture_load;
-       [Widget] Gtk.Button button_contacts_recalculate;
+       [Widget] Gtk.Button button_contacts_exercise_close_and_recalculate;
        [Widget] Gtk.VBox vbox_contacts_signal_comment;
        [Widget] Gtk.TextView textview_contacts_signal_comment;
        [Widget] Gtk.Button button_contacts_signal_save_comment;
diff --git a/src/gui/app1/contactsExercise.cs b/src/gui/app1/contactsExercise.cs
index c6333ead..1e7577d5 100644
--- a/src/gui/app1/contactsExercise.cs
+++ b/src/gui/app1/contactsExercise.cs
@@ -56,6 +56,12 @@ public partial class ChronoJumpWindow
                on_button_contacts_exercise_close_clicked (o, args);
                on_button_execute_test_clicked(o, args);
        }
+       private void on_button_contacts_exercise_close_and_recalculate_clicked (object o, EventArgs args)
+       {
+               on_button_contacts_exercise_close_clicked (o, args);
+               on_button_contacts_recalculate_clicked(o, args);
+       }
+
 
        private void on_button_image_test_zoom_clicked(object o, EventArgs args)
        {
diff --git a/src/gui/app1/forceSensor.cs b/src/gui/app1/forceSensor.cs
index 83334505..6ec9a916 100644
--- a/src/gui/app1/forceSensor.cs
+++ b/src/gui/app1/forceSensor.cs
@@ -443,7 +443,7 @@ public partial class ChronoJumpWindow
                fsAI = null;
                lastForceSensorFullPath = null;
 
-               button_contacts_recalculate.Sensitive = false;
+               button_contacts_exercise_close_and_recalculate.Sensitive = false;
                textview_contacts_signal_comment.Buffer.Text = "";
                notebook_force_sensor_analyze.Sensitive = false;
                button_force_sensor_analyze_options.Sensitive = false;
@@ -1087,7 +1087,7 @@ LogB.Information(" fs C ");
                                                forceSensorZoomDefaultValues();
                                                forceSensorDoGraphAI();
                                        }
-                                       button_contacts_recalculate.Sensitive = true;
+                                       button_contacts_exercise_close_and_recalculate.Sensitive = true;
                                        button_delete_last_test.Sensitive = true;
                                        force_capture_drawingarea.Sensitive = true;
                                        button_force_sensor_image_save_signal.Sensitive = true;
@@ -1117,7 +1117,7 @@ LogB.Information(" fs C ");
                                button_force_sensor_analyze_analyze.Sensitive = false;
                                button_force_sensor_image_save_rfd_auto.Sensitive = false;
                                button_force_sensor_image_save_rfd_manual.Sensitive = false;
-                               button_contacts_recalculate.Sensitive = false;
+                               button_contacts_exercise_close_and_recalculate.Sensitive = false;
                                button_delete_last_test.Sensitive = false;
                        }
                        else
@@ -1561,7 +1561,7 @@ LogB.Information(" fs R ");
                        forceSensorDoGraphAI();
                }
                //event_execute_label_message.Text = "Loaded: " + 
Util.GetLastPartOfPath(filechooser.Filename);
-               button_contacts_recalculate.Sensitive = true;
+               button_contacts_exercise_close_and_recalculate.Sensitive = true;
                force_capture_drawingarea.Sensitive = true;
                notebook_force_sensor_analyze.Sensitive = true;
                button_force_sensor_analyze_options.Sensitive = true;
diff --git a/src/gui/runEncoder.cs b/src/gui/runEncoder.cs
index e619cb7f..59886218 100644
--- a/src/gui/runEncoder.cs
+++ b/src/gui/runEncoder.cs
@@ -247,7 +247,7 @@ public partial class ChronoJumpWindow
                textview_contacts_signal_comment.Buffer.Text = "";
                assignCurrentRunEncoderExercise();
                raceEncoderReadWidgets();
-               button_contacts_recalculate.Sensitive = false;
+               button_contacts_exercise_close_and_recalculate.Sensitive = false;
 
                bool connected = runEncoderCapturePre4_GTK();
                if(! connected)
@@ -262,7 +262,7 @@ public partial class ChronoJumpWindow
        {
                currentRunEncoder = new RunEncoder();
 
-               button_contacts_recalculate.Sensitive = false;
+               button_contacts_exercise_close_and_recalculate.Sensitive = false;
                textview_contacts_signal_comment.Buffer.Text = "";
                image_run_encoder_graph.Sensitive = false;
 
@@ -753,7 +753,7 @@ public partial class ChronoJumpWindow
 
                raceEncoderCopyTempAndDoGraphs();
 
-               button_contacts_recalculate.Sensitive = true;
+               button_contacts_exercise_close_and_recalculate.Sensitive = true;
 
                button_video_play_this_test_contacts.Sensitive = (re.VideoURL != "");
                sensitiveLastTestButtons(true);
@@ -902,12 +902,9 @@ public partial class ChronoJumpWindow
                if(lastRunEncoderFullPath != null && lastRunEncoderFullPath != "")
                        raceEncoderCopyTempAndDoGraphs();
 
-               button_contacts_recalculate.Sensitive = false; //to not be called two times
-
                event_execute_label_message.Text = "Recalculated.";
-
                radio_mode_contacts_analyze.Active = true;
-               button_contacts_recalculate.Sensitive = true;
+               button_contacts_exercise_close_and_recalculate.Sensitive = true;
 
                //update SQL with exercise, device, distance, temperature, comments
                currentRunEncoder.ExerciseID = currentRunEncoderExercise.UniqueID;
@@ -1093,7 +1090,7 @@ LogB.Information(" re C finish");
                                        runEncoderAnalyzeOpenImage();
                                        notebook_analyze.CurrentPage = 
Convert.ToInt32(notebook_analyze_pages.RACEENCODER);
                                        radio_mode_contacts_analyze.Active = true;
-                                       button_contacts_recalculate.Sensitive = true;
+                                       button_contacts_exercise_close_and_recalculate.Sensitive = true;
                                        button_delete_last_test.Sensitive = true;
 
                                        /*


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