[chronojump] Better gui for frame_contacts_exercise & fixed sensitiveness



commit 5a5a0ec484ca881912dc1764f08c834921058e00
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Jul 30 17:36:19 2021 +0200

    Better gui for frame_contacts_exercise & fixed sensitiveness

 glade/app1.glade                 | 78 ++++++++++++++++++++++++++--------------
 src/gui/app1/chronojump.cs       | 15 ++++----
 src/gui/app1/contactsExercise.cs |  8 +++--
 src/gui/app1/forceSensor.cs      |  6 ++--
 src/gui/app1/runEncoder.cs       |  2 +-
 5 files changed, 67 insertions(+), 42 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 3c3186de1..324130c00 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -5890,20 +5890,19 @@ EncoderInertialCapture</property>
                                                     <property name="can_focus">False</property>
                                                     <property name="spacing">16</property>
                                                     <child>
-                                                      <widget class="GtkFrame" id="frame1">
+                                                      <widget class="GtkFrame" id="frame_contacts_exercise">
                                                         <property name="visible">True</property>
                                                         <property name="can_focus">False</property>
                                                         <property name="label_xalign">0</property>
-                                                        <property name="label_yalign">1</property>
                                                         <property name="shadow_type">out</property>
                                                         <child>
                                                           <widget class="GtkAlignment" id="alignment6">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="top_padding">2</property>
-                                                            <property name="bottom_padding">2</property>
-                                                            <property name="left_padding">2</property>
-                                                            <property name="right_padding">2</property>
+                                                            <property name="top_padding">6</property>
+                                                            <property name="bottom_padding">6</property>
+                                                            <property name="left_padding">6</property>
+                                                            <property name="right_padding">6</property>
                                                             <child>
                                                             <widget class="GtkVBox" id="vbox66">
                                                             <property name="visible">True</property>
@@ -5972,8 +5971,8 @@ EncoderInertialCapture</property>
                                                             </child>
                                                             </widget>
                                                             <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
                                                             <property name="position">0</property>
                                                             </packing>
                                                             </child>
@@ -5984,21 +5983,44 @@ EncoderInertialCapture</property>
                                                             <property name="spacing">8</property>
                                                             <child>
                                                             <widget class="GtkButton" 
id="button_contacts_exercise">
-                                                            <property name="width_request">40</property>
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="receives_default">True</property>
-                                                            <property name="tooltip" 
translatable="yes">Test</property>
+                                                            <property name="tooltip" 
translatable="yes">Configure exercise</property>
                                                             <property name="relief">half</property>
                                                             <signal name="clicked" 
handler="on_button_contacts_exercise_clicked" swapped="no"/>
                                                             <accelerator key="t" signal="clicked" 
modifiers="GDK_CONTROL_MASK"/>
                                                             <child>
+                                                            <widget class="GtkHBox" id="hbox552">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">4</property>
+                                                            <child>
                                                             <widget class="GtkImage" 
id="image_contacts_exercise_settings">
                                                             <property name="width_request">24</property>
                                                             <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="label655">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" 
translatable="yes">Exercise</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
                                                             </child>
                                                             </widget>
                                                             <packing>
@@ -6080,11 +6102,7 @@ EncoderInertialCapture</property>
                                                           </widget>
                                                         </child>
                                                         <child>
-                                                          <widget class="GtkLabel" id="label654">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="label" 
translatable="yes">Exercise</property>
-                                                          </widget>
+                                                          <placeholder/>
                                                           <packing>
                                                             <property name="type">label_item</property>
                                                           </packing>
@@ -25850,6 +25868,9 @@ Concentric</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -32161,6 +32182,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>
@@ -32197,18 +32230,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>
@@ -41461,6 +41482,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 6a4b9a40e..92db71711 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -234,9 +234,6 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.Button button_persons_down;
 
        //tests
-       [Widget] Gtk.Button button_contacts_exercise;
-       [Widget] Gtk.Label label_contacts_exercise_selected_name;
-       [Widget] Gtk.Label label_contacts_exercise_selected_options;
        [Widget] Gtk.Notebook notebook_contacts_capture_doing_wait;
        [Widget] Gtk.Button button_contacts_bells;
        [Widget] Gtk.Button button_contacts_capture_session_overview;
@@ -7937,7 +7934,7 @@ LogB.Debug("mc finished 5");
        
                button_contacts_person_change.Sensitive = false;
                button_encoder_person_change.Sensitive = false;
-               button_contacts_exercise.Sensitive = false;
+               frame_contacts_exercise.Sensitive = false;
                
                //notebooks
                notebook_analyze.Sensitive = false;
@@ -7996,7 +7993,7 @@ LogB.Debug("mc finished 5");
                if(notebook_encoder_sup.CurrentPage == 1)
                        notebook_encoder_sup.CurrentPage = 0;
 
-               button_contacts_exercise.Sensitive = false;
+               frame_contacts_exercise.Sensitive = false;
                notebook_analyze.Sensitive = false;
                notebook_results.Sensitive = false;
                encoder_sensitive_all_except_device(false);
@@ -8023,7 +8020,7 @@ LogB.Debug("mc finished 5");
                encoderButtonsSensitive(encoderSensEnum.YESPERSON);
                personChanged();
                
-               button_contacts_exercise.Sensitive = true;
+               frame_contacts_exercise.Sensitive = true;
                notebook_analyze.Sensitive = true;
                notebook_results.Sensitive = true;
                encoder_sensitive_all_except_device(true);
@@ -8102,7 +8099,7 @@ LogB.Debug("mc finished 5");
                alignment_button_force_sensor_adjust.Sensitive = false;
                button_force_sensor_sync.Sensitive = false;
                button_auto_start.Sensitive = false;
-               button_contacts_exercise.Sensitive = false;
+               frame_contacts_exercise.Sensitive = false;
                event_execute_button_update.Sensitive = false;
                
                //hbox_multi_chronopic_buttons.Sensitive = false;
@@ -8168,7 +8165,7 @@ LogB.Debug("mc finished 5");
                alignment_button_force_sensor_adjust.Sensitive = true;
                button_force_sensor_sync.Sensitive = true;
                button_auto_start.Sensitive = true;
-               button_contacts_exercise.Sensitive = true;
+               frame_contacts_exercise.Sensitive = true;
                event_execute_button_update.Sensitive = true;
 
                //forceSensor and runEncoder does not use currentEventExecute
@@ -8293,7 +8290,7 @@ LogB.Debug("mc finished 5");
                //if automode, sensitiveGuiEventDoing, sensitiveGuiEventDone don't work
                menus_and_mode_sensitive (! start);
                frame_persons.Sensitive         = ! start;
-               button_contacts_exercise.Sensitive = ! start;
+               frame_contacts_exercise.Sensitive = ! start;
 
                hbox_jump_auto_controls.Visible  = start;
 
diff --git a/src/gui/app1/contactsExercise.cs b/src/gui/app1/contactsExercise.cs
index daa5bf6c1..fd3a05dd9 100644
--- a/src/gui/app1/contactsExercise.cs
+++ b/src/gui/app1/contactsExercise.cs
@@ -27,8 +27,12 @@ using Mono.Unix;
 
 public partial class ChronoJumpWindow 
 {
+       [Widget] Gtk.Frame frame_contacts_exercise;
        [Widget] Gtk.Button button_combo_select_contacts_top_left;
        [Widget] Gtk.Button button_combo_select_contacts_top_right;
+       [Widget] Gtk.Button button_contacts_exercise;
+       [Widget] Gtk.Label label_contacts_exercise_selected_name;
+       [Widget] Gtk.Label label_contacts_exercise_selected_options;
 
        private void on_button_contacts_exercise_clicked (object o, EventArgs args)
        {
@@ -37,7 +41,7 @@ public partial class ChronoJumpWindow
                hbox_contacts_device_adjust_threshold.Sensitive = false;
                frame_persons.Sensitive = false;
                combo_select_contacts_top.Sensitive = false;
-               button_contacts_exercise.Sensitive = false;
+               frame_contacts_exercise.Sensitive = false;
                hbox_contacts_sup_capture_analyze_two_buttons.Sensitive = false;
                hbox_top_person.Sensitive = false;
 
@@ -51,7 +55,7 @@ public partial class ChronoJumpWindow
                hbox_contacts_device_adjust_threshold.Sensitive = true;
                frame_persons.Sensitive = true;
                combo_select_contacts_top.Sensitive = true;
-               button_contacts_exercise.Sensitive = true;
+               frame_contacts_exercise.Sensitive = true;
                hbox_contacts_sup_capture_analyze_two_buttons.Sensitive = true;
                hbox_top_person.Sensitive = true;
 
diff --git a/src/gui/app1/forceSensor.cs b/src/gui/app1/forceSensor.cs
index 301740008..f750f77b7 100644
--- a/src/gui/app1/forceSensor.cs
+++ b/src/gui/app1/forceSensor.cs
@@ -516,7 +516,7 @@ public partial class ChronoJumpWindow
        {
                //force related buttons
                hbox_force_capture_buttons.Sensitive = sensitive;
-               button_contacts_exercise.Sensitive = sensitive;
+               frame_contacts_exercise.Sensitive = sensitive;
                button_execute_test.Sensitive = sensitive;
                button_force_sensor_analyze_load.Sensitive = sensitive;
                hbox_contacts_camera.Sensitive = sensitive;
@@ -2921,7 +2921,7 @@ LogB.Information(" fs R ");
                notebook_contacts_execute_or.CurrentPage = 2;
 
                viewport_chronopics.Sensitive = false;
-               button_contacts_exercise.Sensitive = false;
+               frame_contacts_exercise.Sensitive = false;
 
                forceSensorCaptureAdjustSensitivity(false);
                force_sensor_adjust_label_message.Text = Catalog.GetString("If you want to calibrate, please 
tare first.");
@@ -2934,7 +2934,7 @@ LogB.Information(" fs R ");
                notebook_contacts_execute_or.CurrentPage = 0;
 
                viewport_chronopics.Sensitive = true;
-               button_contacts_exercise.Sensitive = true;
+               frame_contacts_exercise.Sensitive = true;
 
                forceSensorCaptureAdjustSensitivity(true);
                event_execute_label_message.Text = "";
diff --git a/src/gui/app1/runEncoder.cs b/src/gui/app1/runEncoder.cs
index f3074da40..d03c2e8b6 100644
--- a/src/gui/app1/runEncoder.cs
+++ b/src/gui/app1/runEncoder.cs
@@ -1619,7 +1619,7 @@ public partial class ChronoJumpWindow
                //runEncoder related buttons
                vbox_run_encoder_capture_buttons.Sensitive = sensitive;
                vbox_run_encoder_capture_options.Sensitive = sensitive;
-               button_contacts_exercise.Sensitive = sensitive;
+               frame_contacts_exercise.Sensitive = sensitive;
                button_execute_test.Sensitive = sensitive;
                hbox_contacts_camera.Sensitive = sensitive;
 


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