[chronojump] Devices on right top only show on networks. adjust and threshold under new device. Other gui related



commit 28af1de85dc5140d75f0354295afa874ce695425
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Jun 14 16:50:44 2022 +0200

    Devices on right top only show on networks. adjust and threshold under new device. Other gui related 
changes

 glade/app1.glade            | 279 +++++++++++++++++++++++++++-----------------
 src/gui/app1/chronojump.cs  |  70 ++++++-----
 src/gui/app1/forceSensor.cs |   6 +-
 src/gui/app1/icons.cs       |   2 +
 src/gui/chronopic.cs        |   1 -
 src/gui/networks.cs         |  10 ++
 6 files changed, 224 insertions(+), 144 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index cc7086361..bded801d7 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -5298,6 +5298,11 @@ EncoderInertialCapture</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">8</property>
                                                             <child>
+                                                            <widget class="GtkAlignment" id="alignment10">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="right_padding">8</property>
+                                                            <child>
                                                             <widget class="GtkHBox" id="hbox118">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
@@ -5374,26 +5379,29 @@ EncoderInertialCapture</property>
                                                             <widget class="GtkHBox" 
id="hbox_contacts_detect_and_execute">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="spacing">2</property>
+                                                            <property name="spacing">8</property>
                                                             <child>
                                                             <widget class="GtkVBox" id="vbox70">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
+                                                            <property name="spacing">8</property>
                                                             <child>
-                                                            <widget class="GtkButton" id="button3">
+                                                            <widget class="GtkButton" 
id="button_contacts_detect_small">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="receives_default">True</property>
                                                             <signal name="clicked" 
handler="on_button_contacts_detect_clicked" swapped="no"/>
                                                             <child>
-                                                            <widget class="GtkVBox" id="vbox272">
+                                                            <widget class="GtkHBox" id="hbox325">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
+                                                            <property name="spacing">6</property>
                                                             <child>
-                                                            <widget class="GtkLabel" 
id="label_button_contacts_detect2">
+                                                            <widget class="GtkImage" 
id="image_chronopic_connect_contacts2">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="label">Device</property>
+                                                            <property name="stock">gtk-connect</property>
+                                                            <property name="icon-size">2</property>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -5402,11 +5410,10 @@ EncoderInertialCapture</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkImage" 
id="image_chronopic_connect_contacts2">
+                                                            <widget class="GtkLabel" 
id="label_button_contacts_detect1">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="stock">gtk-connect</property>
-                                                            <property name="icon-size">2</property>
+                                                            <property name="label">Device</property>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -5418,11 +5425,109 @@ 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>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox240">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <child>
+                                                            <widget class="GtkButton" id="button_threshold">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <signal name="clicked" 
handler="on_threshold_clicked" swapped="no"/>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox327">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">6</property>
+                                                            <child>
+                                                            <widget class="GtkImage" 
id="image_force_sensor_capture_adjust1">
+                                                            <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="label_threshold">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">2</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkButton" 
id="button_force_sensor_adjust">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <signal name="clicked" 
handler="on_button_force_sensor_adjust_clicked" swapped="no"/>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox207">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">6</property>
+                                                            <child>
+                                                            <widget class="GtkImage" 
id="image_force_sensor_capture_adjust">
+                                                            <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="label_force_sensor_capture_adjust">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" 
translatable="yes">Adjust</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">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="expand">True</property>
@@ -5440,17 +5545,34 @@ EncoderInertialCapture</property>
                                                             <signal name="clicked" 
handler="on_button_execute_test_clicked" swapped="no"/>
                                                             <accelerator key="space" signal="clicked" 
modifiers="GDK_CONTROL_MASK"/>
                                                             <child>
-                                                            <widget class="GtkAlignment" id="alignment21">
+                                                            <widget class="GtkVBox" id="vbox80">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="border_width">2</property>
+                                                            <property name="spacing">2</property>
+                                                            <child>
+                                                            <widget class="GtkLabel" id="label277">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="left_padding">2</property>
-                                                            <property name="right_padding">2</property>
+                                                            <property name="label" 
translatable="yes">Capture</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
                                                             <child>
                                                             <widget class="GtkImage" 
id="image_button_execute">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="stock">gtk-apply</property>
                                                             </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
                                                             </child>
                                                             </widget>
                                                             </child>
@@ -5469,6 +5591,8 @@ EncoderInertialCapture</property>
                                                             </packing>
                                                             </child>
                                                             </widget>
+                                                            </child>
+                                                            </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
                                                             <property name="fill">False</property>
@@ -6438,11 +6562,11 @@ EncoderInertialCapture</property>
                                                         <property name="can_focus">False</property>
                                                         <property name="spacing">8</property>
                                                         <child>
-                                                          <widget class="GtkHBox" 
id="hbox_contacts_device_adjust_threshold">
+                                                          <widget class="GtkHBox" id="hbox170">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <child>
-                                                            <widget class="GtkHBox" id="hbox170">
+                                                            <widget class="GtkHBox" 
id="hbox_contacts_device_adjust_threshold">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <child>
@@ -6453,95 +6577,8 @@ EncoderInertialCapture</property>
                                                             <signal name="clicked" 
handler="on_button_force_sensor_sync_clicked" swapped="no"/>
                                                             </widget>
                                                             <packing>
-                                                            <property name="expand">True</property>
-                                                            <property name="fill">True</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
-                                                            <widget class="GtkAlignment" 
id="alignment_button_force_sensor_adjust">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="left_padding">8</property>
-                                                            <child>
-                                                            <widget class="GtkButton" 
id="button_force_sensor_adjust">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property name="receives_default">True</property>
-                                                            <signal name="clicked" 
handler="on_button_force_sensor_adjust_clicked" swapped="no"/>
-                                                            <child>
-                                                            <widget class="GtkHBox" id="hbox207">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="spacing">6</property>
-                                                            <child>
-                                                            <widget class="GtkImage" 
id="image_force_sensor_capture_adjust">
-                                                            <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="label_force_sensor_capture_adjust">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="label" 
translatable="yes">Adjust</property>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">True</property>
-                                                            <property name="fill">True</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="pack_type">end</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
-                                                            <widget class="GtkAlignment" 
id="alignment_button_threshold">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="left_padding">8</property>
-                                                            <child>
-                                                            <widget class="GtkButton" id="button_threshold">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property name="receives_default">True</property>
-                                                            <signal name="clicked" 
handler="on_threshold_clicked" swapped="no"/>
-                                                            <child>
-                                                            <widget class="GtkLabel" id="label_threshold">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            </widget>
-                                                            </child>
-                                                            </widget>
-                                                            </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="pack_type">end</property>
+                                                            <property name="fill">True</property>
                                                             <property name="position">0</property>
                                                             </packing>
                                                             </child>
@@ -6556,12 +6593,10 @@ EncoderInertialCapture</property>
                                                             <property name="shadow_type">none</property>
                                                             <child>
                                                             <widget class="GtkButton" 
id="button_activate_chronopics">
-                                                            <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="can_default">True</property>
                                                             <property name="receives_default">True</property>
                                                             <property name="has_tooltip">True</property>
-                                                            <property name="tooltip" 
translatable="yes">Connect Chronopics</property>
                                                             <property name="relief">half</property>
                                                             <signal name="clicked" 
handler="on_chronopic_contacts_clicked" swapped="no"/>
                                                             <child>
@@ -6609,10 +6644,17 @@ EncoderInertialCapture</property>
                                                             <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="pack_type">end</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
                                                           </widget>
                                                           <packing>
                                                             <property name="expand">True</property>
@@ -6889,7 +6931,7 @@ EncoderInertialCapture</property>
                                                             </child>
                                                           </widget>
                                                           <packing>
-                                                            <property name="expand">True</property>
+                                                            <property name="expand">False</property>
                                                             <property name="fill">True</property>
                                                             <property name="pack_type">end</property>
                                                             <property name="position">1</property>
@@ -25984,6 +26026,12 @@ Concentric</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -32534,7 +32582,6 @@ Concentric</property>
                                                             <property name="right_padding">6</property>
                                                             <child>
                                                             <widget class="GtkButton" 
id="button_activate_chronopics_encoder">
-                                                            <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="can_default">True</property>
                                                             <property name="receives_default">True</property>
@@ -32602,7 +32649,7 @@ Concentric</property>
                                                             </child>
                                                             </widget>
                                                             <packing>
-                                                            <property name="expand">False</property>
+                                                            <property name="expand">True</property>
                                                             <property name="fill">True</property>
                                                             <property name="position">0</property>
                                                             </packing>
@@ -32776,7 +32823,7 @@ Concentric</property>
                                                             </child>
                                                             </widget>
                                                             <packing>
-                                                            <property name="expand">True</property>
+                                                            <property name="expand">False</property>
                                                             <property name="fill">True</property>
                                                             <property name="position">1</property>
                                                             </packing>
@@ -42060,6 +42107,12 @@ then click this button.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -50094,6 +50147,12 @@ Since Chronojump 2.1.3, backups contain the complete data.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             </child>
                                                             </widget>
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index cb84eca88..c42d427e3 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -300,6 +300,7 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.Table table_micro_discover;
        [Widget] Gtk.HBox hbox_contacts_detect_and_execute;
        [Widget] Gtk.Button button_contacts_detect;
+       [Widget] Gtk.Button button_contacts_detect_small;
        [Widget] Gtk.EventBox eventbox_button_micro_discover_cancel_close;
        [Widget] Gtk.Image image_button_micro_discover_cancel_close;
        [Widget] Gtk.Label label_button_micro_discover_cancel_close;
@@ -350,8 +351,8 @@ public partial class ChronoJumpWindow
 
        [Widget] Gtk.HBox hbox_chronopics_and_more;
        [Widget] Gtk.Button button_activate_chronopics;
-       [Widget] Gtk.Alignment alignment_button_threshold;
-       [Widget] Gtk.Alignment alignment_button_force_sensor_adjust;
+       [Widget] Gtk.Button button_threshold;
+       [Widget] Gtk.Button button_force_sensor_adjust;
        [Widget] Gtk.Button button_force_sensor_sync;
 
        //non standard icons    
@@ -3608,7 +3609,7 @@ public partial class ChronoJumpWindow
                hbox_race_analyzer_capture_tab_result_views.Visible = false;
                notebook_analyze.CurrentPage = Convert.ToInt32(notebook_analyze_pages.STATISTICS);
                button_inspect_last_test_run_intervallic.Visible = false;
-               alignment_button_force_sensor_adjust.Visible = false;
+               button_force_sensor_adjust.Visible = false;
                button_force_sensor_sync.Visible = false;
                vbox_contacts_load_recalculate.Visible = false;
                button_contacts_exercise_close_and_recalculate.Visible = false;
@@ -3624,8 +3625,7 @@ public partial class ChronoJumpWindow
                hbox_drawingarea_realtime_capture_cairo.Visible = false;
                vbox_event_execute_drawingarea_run_interval_realtime_capture_cairo.Visible = false;
 
-               button_contacts_detect.Visible = false;
-               hbox_contacts_detect_and_execute.Visible = true;
+               button_detect_show_hide (false);
 
                //blank exercise options: useful for changing from jumps or runs to forceSensor, runEncoder, 
reaction time, other
                label_contacts_exercise_selected_name.Visible = true; //will not be visible when all the 
contacts_top combo is implemented
@@ -3646,13 +3646,12 @@ public partial class ChronoJumpWindow
 
                if(m == Constants.Modes.JUMPSSIMPLE || m == Constants.Modes.JUMPSREACTIVE)
                {
-                       button_contacts_detect.Visible = true;
-                       hbox_contacts_detect_and_execute.Visible = false;
+                       button_detect_show_hide (true);
 
                        notebook_sup.CurrentPage = Convert.ToInt32(notebook_sup_pages.CONTACTS);
                        //notebook_capture_analyze.ShowTabs = true;
                        hbox_contacts_sup_capture_analyze_two_buttons.Visible = true;
-                       alignment_button_threshold.Visible = true;
+                       button_threshold.Visible = true;
 
                        label_contacts_exercise_selected_options.Visible = true;
                        image_top_laterality_contacts.Visible = false;
@@ -3716,13 +3715,12 @@ public partial class ChronoJumpWindow
                        LogB.Information(string.Format("wireless conditions B: {0}, {1}",
                                cp2016.StoredWireless, chronopicRegister != null));
 
-                       button_contacts_detect.Visible = true;
-                       hbox_contacts_detect_and_execute.Visible = false;
+                       button_detect_show_hide (true);
 
                        notebook_sup.CurrentPage = Convert.ToInt32(notebook_sup_pages.CONTACTS);
                        //notebook_capture_analyze.ShowTabs = true;
                        hbox_contacts_sup_capture_analyze_two_buttons.Visible = true;
-                       alignment_button_threshold.Visible = true;
+                       button_threshold.Visible = true;
 
                        label_contacts_exercise_selected_options.Visible = true;
                        image_top_laterality_contacts.Visible = false;
@@ -3778,6 +3776,7 @@ public partial class ChronoJumpWindow
                }
                else if(m == Constants.Modes.POWERGRAVITATORY || m == Constants.Modes.POWERINERTIAL) 
                {
+                       button_detect_show_hide (true);
                        notebook_sup.CurrentPage = Convert.ToInt32(notebook_sup_pages.ENCODER);
 
 
@@ -3897,8 +3896,7 @@ public partial class ChronoJumpWindow
                } 
                else if(Constants.ModeIsFORCESENSOR (m))
                {
-                       button_contacts_detect.Visible = true;
-                       hbox_contacts_detect_and_execute.Visible = false;
+                       button_detect_show_hide (true);
 
                        notebook_sup.CurrentPage = Convert.ToInt32(notebook_sup_pages.CONTACTS);
                        notebooks_change(m);
@@ -3916,8 +3914,8 @@ public partial class ChronoJumpWindow
                        button_contacts_bells.Sensitive = true;
                        //notebook_capture_analyze.ShowTabs = false; //only capture tab is shown (only valid 
for "OTHER" tests)
                        hbox_contacts_sup_capture_analyze_two_buttons.Visible = true;
-                       alignment_button_threshold.Visible = false;
-                       alignment_button_force_sensor_adjust.Visible = true;
+                       button_threshold.Visible = false;
+                       button_force_sensor_adjust.Visible = true;
                        //button_force_sensor_sync.Visible = true; //TODO: show again when it fully works, 
now is hidden for 2.1.0 release
                        //notebook_capture_analyze.GetNthPage(2).Hide(); //hide jumpsProfile on other tests
 
@@ -3946,8 +3944,7 @@ public partial class ChronoJumpWindow
                }
                else if(m == Constants.Modes.RUNSENCODER)
                {
-                       button_contacts_detect.Visible = true;
-                       hbox_contacts_detect_and_execute.Visible = false;
+                       button_detect_show_hide (true);
 
                        notebook_sup.CurrentPage = Convert.ToInt32(notebook_sup_pages.CONTACTS);
                        notebooks_change(m);
@@ -3966,7 +3963,7 @@ public partial class ChronoJumpWindow
 
                        //notebook_capture_analyze.ShowTabs = false; //only capture tab is shown (only valid 
for "OTHER" tests)
                        hbox_contacts_sup_capture_analyze_two_buttons.Visible = true;
-                       alignment_button_threshold.Visible = false;
+                       button_threshold.Visible = false;
                        //notebook_capture_analyze.GetNthPage(2).Hide(); //hide jumpsProfile on other tests
 
                        hbox_race_analyzer_capture_tab_result_views.Visible = true;
@@ -3997,7 +3994,7 @@ public partial class ChronoJumpWindow
                        notebook_capture_analyze.CurrentPage = 0;
                        //notebook_capture_analyze.ShowTabs = false; //only capture tab is shown (only valid 
for "OTHER" tests)
                        hbox_contacts_sup_capture_analyze_two_buttons.Visible = false;
-                       alignment_button_threshold.Visible = true;
+                       button_threshold.Visible = true;
                        //notebook_capture_analyze.GetNthPage(2).Hide(); //hide jumpsProfile on other tests
 
                        label_contacts_exercise_selected_options.Visible = true;
@@ -4017,7 +4014,7 @@ public partial class ChronoJumpWindow
                        notebook_capture_analyze.CurrentPage = 0;
                        //notebook_capture_analyze.ShowTabs = false; //only capture tab is shown (only valid 
for "OTHER" tests)
                        hbox_contacts_sup_capture_analyze_two_buttons.Visible = false;
-                       alignment_button_threshold.Visible = true;
+                       button_threshold.Visible = true;
                        //notebook_capture_analyze.GetNthPage(2).Hide(); //hide jumpsProfile on other tests
 
                        label_contacts_exercise_selected_options.Visible = true;
@@ -4631,6 +4628,17 @@ public partial class ChronoJumpWindow
           ----------------- discover / detect devices --------->
           */
 
+       //also manages if networks or not, on networks do not show
+       //TODO: add the encoder controls
+       private void button_detect_show_hide (bool show)
+       {
+               //compujump will continue with the top right device button, far from the capture button
+               if (! configChronojump.Compujump)
+               {
+                       button_contacts_detect.Visible = show;
+                       hbox_contacts_detect_and_execute.Visible = ! show;
+               }
+       }
 
        //right now implemented only contacts
        DiscoverWindow discoverWin;
@@ -4680,8 +4688,7 @@ public partial class ChronoJumpWindow
                if(discoverWin.PortSelected.Port != "")
                {
                        chronopicRegister.SetSelectedForMode (discoverWin.PortSelected, current_mode);
-                       button_contacts_detect.Visible = false;
-                       hbox_contacts_detect_and_execute.Visible = true;
+                       button_detect_show_hide (false);
                }
 
                notebook_sup.CurrentPage = app1s_notebook_sup_entered_from; //CONTACTS or ENCODER
@@ -4751,7 +4758,10 @@ public partial class ChronoJumpWindow
                                if(currentSession.Name == Constants.SessionSimulatedName)
                                        on_button_execute_test_acceptedPre_start_camera 
(WebcamStartedTestStart.CHRONOPIC);
                                else
-                                       on_button_contacts_detect_clicked (o, args); //open discover win
+                               {
+                                       if (! configChronojump.Compujump)
+                                               on_button_contacts_detect_clicked (o, args); //open discover 
win
+                               }
                        } else {
                                LogB.Information ("getSelectedFormode: " + 
chronopicRegister.GetSelectedForMode (current_mode).ToString ());
                                chronopicConnectionSequenceInit (chronopicRegister.GetSelectedForMode 
(current_mode));
@@ -8326,7 +8336,7 @@ LogB.Debug("mc finished 5");
                vbox_execute_test.Sensitive = false;
                button_execute_test.Sensitive = false;
                button_auto_start.Sensitive = false;
-               alignment_button_force_sensor_adjust.Sensitive = false;
+               button_force_sensor_adjust.Sensitive = false;
                button_force_sensor_sync.Sensitive = false;
 
                encoderButtonsSensitive(encoderSensEnum.NOSESSION);
@@ -8345,7 +8355,7 @@ LogB.Debug("mc finished 5");
                
                button_contacts_person_change.Sensitive = true;
                button_encoder_person_change.Sensitive = true;
-               alignment_button_force_sensor_adjust.Sensitive = true;
+               button_force_sensor_adjust.Sensitive = true;
                button_force_sensor_sync.Sensitive = true;
                
                menuSessionSensitive(true);
@@ -8470,8 +8480,8 @@ LogB.Debug("mc finished 5");
 
                button_activate_chronopics.Sensitive = false;
                button_activate_chronopics_encoder.Sensitive = false;
-               alignment_button_threshold.Sensitive = false;
-               alignment_button_force_sensor_adjust.Sensitive = false;
+               button_threshold.Sensitive = false;
+               button_force_sensor_adjust.Sensitive = false;
                button_force_sensor_sync.Sensitive = false;
                button_auto_start.Sensitive = false;
                frame_contacts_exercise.Sensitive = false;
@@ -8535,8 +8545,8 @@ LogB.Debug("mc finished 5");
                if(! configChronojump.Compujump)
                        button_activate_chronopics_encoder.Sensitive = true;
 
-               alignment_button_threshold.Sensitive = true;
-               alignment_button_force_sensor_adjust.Sensitive = true;
+               button_threshold.Sensitive = true;
+               button_force_sensor_adjust.Sensitive = true;
                button_force_sensor_sync.Sensitive = true;
                button_auto_start.Sensitive = true;
                frame_contacts_exercise.Sensitive = true;
@@ -8681,7 +8691,7 @@ LogB.Debug("mc finished 5");
        private void sensitiveGuiAutoExecuteOrWait (bool execute) {
                //if automode, sensitiveGuiEventDoing, sensitiveGuiEventDone don't work
                button_activate_chronopics.Sensitive    = ! execute;
-               alignment_button_threshold.Sensitive            = ! execute;
+               button_threshold.Sensitive              = ! execute;
                button_execute_test.Sensitive           = ! execute;
                sensitiveLastTestButtons(! execute);
        }
diff --git a/src/gui/app1/forceSensor.cs b/src/gui/app1/forceSensor.cs
index b31063fc4..899f50321 100644
--- a/src/gui/app1/forceSensor.cs
+++ b/src/gui/app1/forceSensor.cs
@@ -535,7 +535,7 @@ public partial class ChronoJumpWindow
 
                hbox_top_person.Sensitive = sensitive;
                hbox_chronopics_and_more.Sensitive = sensitive;
-               alignment_button_force_sensor_adjust.Sensitive = sensitive;
+               button_force_sensor_adjust.Sensitive = sensitive;
        }
 
        private void on_button_force_sensor_stiffness_detect_clicked (object o, EventArgs args)
@@ -3171,7 +3171,7 @@ LogB.Information(" fs R ");
 
        private void on_button_force_sensor_adjust_clicked (object o, EventArgs args)
        {
-               alignment_button_force_sensor_adjust.Sensitive = false; //to not be called again
+               button_force_sensor_adjust.Sensitive = false; //to not be called again
 
                notebook_contacts_capture_doing_wait.Sensitive = false;
                notebook_contacts_execute_or.CurrentPage = 
Convert.ToInt32(notebook_contacts_execute_or_pages.FORCESENSORADJUST);
@@ -3184,7 +3184,7 @@ LogB.Information(" fs R ");
        }
        private void on_button_force_sensor_adjust_close_clicked (object o, EventArgs args)
        {
-               alignment_button_force_sensor_adjust.Sensitive = true;
+               button_force_sensor_adjust.Sensitive = true;
 
                notebook_contacts_capture_doing_wait.Sensitive = true;
                notebook_contacts_execute_or.CurrentPage = 
Convert.ToInt32(notebook_contacts_execute_or_pages.EXECUTE);
diff --git a/src/gui/app1/icons.cs b/src/gui/app1/icons.cs
index b9d4b683b..263428ced 100644
--- a/src/gui/app1/icons.cs
+++ b/src/gui/app1/icons.cs
@@ -182,6 +182,7 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.Image image_force_sensor_tare;
        [Widget] Gtk.Image image_force_sensor_calibrate;
        [Widget] Gtk.Image image_force_sensor_capture_adjust;
+       [Widget] Gtk.Image image_force_sensor_capture_adjust1;
        [Widget] Gtk.Image image_force_sensor_capture_adjust_close;
        [Widget] Gtk.Image image_force_sensor_analyze_options;
        [Widget] Gtk.Image image_force_sensor_analyze_options1;
@@ -468,6 +469,7 @@ public partial class ChronoJumpWindow
                image_multi_chronopic_repair.Pixbuf = pixbuf;
                image_encoder_configuration.Pixbuf = pixbuf;
                image_force_sensor_capture_adjust.Pixbuf = pixbuf;
+               image_force_sensor_capture_adjust1.Pixbuf = pixbuf;
                image_force_sensor_analyze_options.Pixbuf = pixbuf;
                image_force_sensor_analyze_options1.Pixbuf = pixbuf;
                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_build_16.png");
diff --git a/src/gui/chronopic.cs b/src/gui/chronopic.cs
index 12a3f9816..1e9020efd 100644
--- a/src/gui/chronopic.cs
+++ b/src/gui/chronopic.cs
@@ -98,7 +98,6 @@ public partial class ChronoJumpWindow
                                return;
                        } else {
                        */
-                               button_activate_chronopics.Show();
                                
on_button_execute_test_acceptedPre_start_camera(ChronoJumpWindow.WebcamStartedTestStart.CHRONOPIC);
                                return;
                        //}
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index 7a6656c34..c415be7b5 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -258,6 +258,16 @@ public partial class ChronoJumpWindow
                                button_encoder_analyze_image_compujump_send_email.Visible = true;
                }
 
+               if (configChronojump.Compujump) {
+                       button_activate_chronopics.Visible = true;
+                       button_activate_chronopics_encoder.Visible = true;
+                       button_contacts_detect_small.Visible = false;
+               } else {
+                       button_activate_chronopics.Visible = false;
+                       button_activate_chronopics_encoder.Visible = false;
+                       button_contacts_detect_small.Visible = true;
+               }
+
                if(configChronojump.Raspberry)
                {
                        //make easiers to use some treeviews


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