[chronojump] Jumps automatic mode compatible with new gui



commit 478eb59858b898a072e1fb7d1748348c6552e1bc
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Dec 5 11:11:59 2019 +0100

    Jumps automatic mode compatible with new gui

 glade/app1.glade      | 441 +++++++++++++++++++++++++++++++-------------------
 src/gui/chronojump.cs |  11 ++
 2 files changed, 283 insertions(+), 169 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 7b123be3..9f6418af 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -5918,13 +5918,270 @@ EncoderInertialCapture</property>
                                                             <property name="position">4</property>
                                                             </packing>
                                                             </child>
+                                                            <child>
+                                                            <widget class="GtkFrame" id="frame7">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label_xalign">0</property>
+                                                            <property name="shadow_type">in</property>
+                                                            <child>
+                                                            <widget class="GtkNotebook" 
id="notebook_jumps_automatic">
+                                                            <property name="can_focus">True</property>
+                                                            <property name="border_width">4</property>
+                                                            <property name="show_tabs">False</property>
+                                                            <property name="show_border">False</property>
+                                                            <child>
+                                                            <widget class="GtkVBox" id="vbox150">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <child>
+                                                            <widget class="GtkVBox" id="vbox155">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox14">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <child>
+                                                            <widget class="GtkButton" id="button_auto_start">
+                                                            <property name="label" 
translatable="yes">Start</property>
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <property name="tooltip" 
translatable="yes">Start automatic mode</property>
+                                                            <signal name="clicked" 
handler="on_button_auto_start_clicked" swapped="no"/>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkLabel" id="label395">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" translatable="yes">page 
1</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="tab_fill">False</property>
+                                                            <property name="type">tab</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkVBox" id="vbox154">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">8</property>
+                                                            <child>
+                                                            <widget class="GtkHBox" 
id="hbox_jump_auto_controls">
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">20</property>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox20">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">10</property>
+                                                            <child>
+                                                            <widget class="GtkLabel" 
id="label_jump_auto_current_person">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</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_jump_auto_current_test">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox181">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">10</property>
+                                                            <child>
+                                                            <widget class="GtkHBox" 
id="hbox_jump_auto_option">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">4</property>
+                                                            <child>
+                                                            <widget class="GtkButton" id="button_auto_order">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <property name="tooltip" translatable="yes">See 
order</property>
+                                                            <signal name="clicked" 
handler="on_button_auto_order_clicked" swapped="no"/>
+                                                            <child>
+                                                            <widget class="GtkImage" id="image37">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="stock">gtk-index</property>
+                                                            <property name="icon-size">2</property>
+                                                            </widget>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkButton" 
id="button_auto_skip_person">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <property name="tooltip" translatable="yes">Skip 
this person (will perform tests at the end)</property>
+                                                            <signal name="clicked" 
handler="on_button_auto_skip_person_clicked" swapped="no"/>
+                                                            <child>
+                                                            <widget class="GtkImage" 
id="image_auto_person_skip">
+                                                            <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">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkButton" 
id="button_auto_remove_person">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <property name="tooltip" 
translatable="yes">Remove this person from automatic sequence</property>
+                                                            <signal name="clicked" 
handler="on_button_auto_remove_person_clicked" swapped="no"/>
+                                                            <child>
+                                                            <widget class="GtkImage" 
id="image_auto_person_remove">
+                                                            <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">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">2</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkButton" id="button_auto_end">
+                                                            <property name="label" 
translatable="yes">End</property>
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <property name="tooltip" translatable="yes">End 
automatic mode</property>
+                                                            <signal name="clicked" 
handler="on_button_auto_end_clicked" swapped="no"/>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="pack_type">end</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkLabel" id="label396">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" translatable="yes">page 
2</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="position">1</property>
+                                                            <property name="tab_fill">False</property>
+                                                            <property name="type">tab</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkLabel" id="label109">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" 
translatable="yes">Automatic mode</property>
+                                                            <property name="use_markup">True</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="type">label_item</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">5</property>
+                                                            </packing>
+                                                            </child>
                                                           </widget>
                                                         </child>
                                                         <child>
                                                           <widget class="GtkLabel" id="label11">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="label">capture doing</property>
+                                                            <property name="label">capture wait</property>
                                                           </widget>
                                                           <packing>
                                                             <property name="tab_fill">False</property>
@@ -6229,7 +6486,7 @@ EncoderInertialCapture</property>
                                                           <widget class="GtkLabel" id="label51">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="label">capture wait</property>
+                                                            <property name="label">capture doing</property>
                                                           </widget>
                                                           <packing>
                                                             <property name="position">1</property>
@@ -11169,173 +11426,6 @@ EncoderInertialCapture</property>
                                                             <property name="position">1</property>
                                                             </packing>
                                                             </child>
-                                                            <child>
-                                                            <widget class="GtkHBox" 
id="hbox_jump_auto_controls">
-                                                            <property name="can_focus">False</property>
-                                                            <property name="spacing">20</property>
-                                                            <child>
-                                                            <widget class="GtkHBox" id="hbox20">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="spacing">10</property>
-                                                            <child>
-                                                            <widget class="GtkLabel" 
id="label_jump_auto_current_person">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="label">Current person</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_jump_auto_current_test">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="label">(Current test)</property>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="position">1</property>
-                                                            </packing>
-                                                            </child>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">True</property>
-                                                            <property name="fill">True</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
-                                                            <widget class="GtkHBox" 
id="hbox_jump_auto_options">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="spacing">20</property>
-                                                            <child>
-                                                            <widget class="GtkHBox" id="hbox34">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="spacing">8</property>
-                                                            <child>
-                                                            <widget class="GtkButton" id="button_auto_order">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property name="receives_default">True</property>
-                                                            <property name="tooltip" translatable="yes">See 
order</property>
-                                                            <signal name="clicked" 
handler="on_button_auto_order_clicked" swapped="no"/>
-                                                            <child>
-                                                            <widget class="GtkImage" id="image37">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="stock">gtk-index</property>
-                                                            <property name="icon-size">2</property>
-                                                            </widget>
-                                                            </child>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
-                                                            <widget class="GtkButton" 
id="button_auto_skip_person">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property name="receives_default">True</property>
-                                                            <property name="tooltip" translatable="yes">Skip 
this person (will perform tests at the end)</property>
-                                                            <signal name="clicked" 
handler="on_button_auto_skip_person_clicked" swapped="no"/>
-                                                            <child>
-                                                            <widget class="GtkImage" 
id="image_auto_person_skip">
-                                                            <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">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="position">1</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
-                                                            <widget class="GtkButton" 
id="button_auto_remove_person">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property name="receives_default">True</property>
-                                                            <property name="tooltip" 
translatable="yes">Remove this person from automatic sequence</property>
-                                                            <signal name="clicked" 
handler="on_button_auto_remove_person_clicked" swapped="no"/>
-                                                            <child>
-                                                            <widget class="GtkImage" 
id="image_auto_person_remove">
-                                                            <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">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="position">2</property>
-                                                            </packing>
-                                                            </child>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
-                                                            <widget class="GtkButton" id="button_auto_end">
-                                                            <property name="label" translatable="yes">End 
Automatic mode</property>
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property name="receives_default">True</property>
-                                                            <property name="tooltip" translatable="yes">End 
automatic mode</property>
-                                                            <signal name="clicked" 
handler="on_button_auto_end_clicked" swapped="no"/>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="position">1</property>
-                                                            </packing>
-                                                            </child>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="pack_type">end</property>
-                                                            <property name="position">1</property>
-                                                            </packing>
-                                                            </child>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="position">2</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
-                                                            <widget class="GtkButton" id="button_auto_start">
-                                                            <property name="label" 
translatable="yes">Automatic mode</property>
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property name="receives_default">True</property>
-                                                            <property name="tooltip" 
translatable="yes">Start automatic mode</property>
-                                                            <signal name="clicked" 
handler="on_button_auto_start_clicked" swapped="no"/>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">True</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="pack_type">end</property>
-                                                            <property name="position">3</property>
-                                                            </packing>
-                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">True</property>
@@ -12560,6 +12650,7 @@ EncoderInertialCapture</property>
                                                             <property name="spacing">20</property>
                                                             <child>
                                                             <widget class="GtkLabel" id="label113">
+                                                            <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="label" 
translatable="yes">Options</property>
                                                             </widget>
@@ -21986,6 +22077,12 @@ Concentric</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -31327,6 +31424,12 @@ then click this button.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <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 aed25a99..db30af71 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -224,6 +224,7 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.VBox vbox_contacts_signal_comment;
        [Widget] Gtk.TextView textview_contacts_signal_comment;
        [Widget] Gtk.Button button_contacts_signal_save_comment;
+       [Widget] Gtk.Notebook notebook_jumps_automatic;
        [Widget] Gtk.VBox vbox_contacts_device_and_camera;
 
        //jumps
@@ -3168,6 +3169,7 @@ public partial class ChronoJumpWindow
                button_force_sensor_adjust.Visible = false;
                vbox_contacts_load_recalculate.Visible = false;
                vbox_contacts_signal_comment.Visible = false;
+               notebook_jumps_automatic.Visible = false;
 
                //on OSX R is not installed by default. Check if it's installed. Needed for encoder and force 
sensor
                if(
@@ -3198,6 +3200,7 @@ public partial class ChronoJumpWindow
                                notebooks_change(m);
                                on_extra_window_jumps_test_changed(new object(), new EventArgs());
                                hbox_results_legend.Visible = true;
+                               notebook_jumps_automatic.Visible = true;
 
                                if(radio_mode_contacts_analyze.Active)
                                {
@@ -6626,6 +6629,7 @@ LogB.Debug("mc finished 5");
                executeAutoWin.FakeButtonAccept.Clicked -= new EventHandler(on_button_auto_start_accepted);
 
                sensitiveGuiAutoStartEnd (true);
+               notebook_jumps_automatic.CurrentPage = 1;
        
                execute_auto_order = executeAutoWin.GetOrderedData();
                execute_auto_order_pos = 0;
@@ -6662,6 +6666,7 @@ LogB.Debug("mc finished 5");
        private void on_button_auto_end_clicked (object o, EventArgs args) 
        {
                sensitiveGuiAutoStartEnd (false);
+               notebook_jumps_automatic.CurrentPage = 0;
                execute_auto_doing = false;
        }
        
@@ -6785,6 +6790,7 @@ LogB.Debug("mc finished 5");
                                */
                } else {
                        button_execute_test.Sensitive = myTreeViewPersons.IsThereAnyRecord();
+                       button_auto_start.Sensitive = myTreeViewPersons.IsThereAnyRecord();
                }
 
                //Attention: "notebooks_change sqlite problem"
@@ -7333,6 +7339,7 @@ LogB.Debug("mc finished 5");
                sensitiveLastTestButtons(false);
                vbox_execute_test.Sensitive = false;
                button_execute_test.Sensitive = false;
+               button_auto_start.Sensitive = false;
                button_force_sensor_adjust.Sensitive = false;
 
                encoderButtonsSensitive(encoderSensEnum.NOSESSION);
@@ -7366,6 +7373,7 @@ LogB.Debug("mc finished 5");
                hbox_jumps.Sensitive = false;
                hbox_jumps_rj.Sensitive = false;
                button_execute_test.Sensitive = false;
+               button_auto_start.Sensitive = false;
                button_contacts_capture_load.Sensitive = false;
 
                encoderButtonsSensitive(encoderSensEnum.NOPERSON);
@@ -7394,6 +7402,7 @@ LogB.Debug("mc finished 5");
                hbox_jumps.Sensitive = true;
                hbox_jumps_rj.Sensitive = true;
                button_execute_test.Sensitive = true;
+               button_auto_start.Sensitive = true;
                button_contacts_capture_load.Sensitive = true;
 
                encoderButtonsSensitive(encoderSensEnum.YESPERSON);
@@ -7466,6 +7475,7 @@ LogB.Debug("mc finished 5");
                        frame_persons.Sensitive = false;
                
                button_execute_test.Sensitive = false;
+               button_auto_start.Sensitive = false;
                hbox_contacts_camera.Sensitive = false;
                
                button_contacts_person_change.Sensitive = false;
@@ -7528,6 +7538,7 @@ LogB.Debug("mc finished 5");
                        vbox_persons_bottom.Sensitive = true;
 
                button_execute_test.Sensitive = true;
+               button_auto_start.Sensitive = true;
                hbox_contacts_camera.Sensitive = true;
 
                button_contacts_person_change.Sensitive = true;



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