[chronojump] Discover press use this will show small detect button and normal execute_test button



commit a200584b20fd8591005157ea800de689f026298d
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed May 18 14:09:19 2022 +0200

    Discover press use this will show small detect button and normal execute_test button

 glade/app1.glade           | 61 ++++++++++++++++++++++++++++++++++++----------
 src/gui/app1/chronojump.cs | 17 ++++++++-----
 2 files changed, 59 insertions(+), 19 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 397bdfcc3..c5abd6ca8 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -6043,6 +6043,24 @@ device</property>
                                                             </packing>
                                                             </child>
                                                             <child>
+                                                            <widget class="GtkVBox" 
id="vbox_contacts_detect_and_execute">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <child>
+                                                            <widget class="GtkButton" 
id="button_contacts_detect_small">
+                                                            <property name="label" 
translatable="yes">Device</property>
+                                                            <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"/>
+                                                            </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_execute_test">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
@@ -6051,9 +6069,10 @@ device</property>
                                                             <signal name="clicked" 
handler="on_button_execute_test_clicked" swapped="no"/>
                                                             <accelerator key="space" signal="clicked" 
modifiers="GDK_CONTROL_MASK"/>
                                                             <child>
-                                                            <widget class="GtkVBox" id="vbox70">
+                                                            <widget class="GtkVBox" id="vbox271">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
+                                                            <property name="border_width">2</property>
                                                             <child>
                                                             <widget class="GtkLabel" 
id="label_button_execute_connect">
                                                             <property name="visible">True</property>
@@ -6088,6 +6107,13 @@ device</property>
                                                             </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">False</property>
                                                             <property name="fill">False</property>
                                                             <property name="position">0</property>
@@ -26578,6 +26604,9 @@ Concentric</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -32986,18 +33015,6 @@ Concentric</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">6</property>
                                                             <child>
-                                                            <widget class="GtkLabel" 
id="label_video_encoder_tests_will_be_filmed">
-                                                            <property name="can_focus">False</property>
-                                                            <property name="label" translatable="yes">Tests 
will be filmed</property>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="pack_type">end</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
                                                             <widget class="GtkHBox" 
id="hbox_video_encoder_capturing">
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">4</property>
@@ -33034,6 +33051,18 @@ Concentric</property>
                                                             </packing>
                                                             </child>
                                                             <child>
+                                                            <widget class="GtkLabel" 
id="label_video_encoder_tests_will_be_filmed">
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" translatable="yes">Tests 
will be filmed</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="pack_type">end</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
                                                             <widget class="GtkHBox" 
id="hbox_video_encoder_no_capturing">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
@@ -42371,6 +42400,9 @@ then click this button.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -50378,6 +50410,9 @@ Since Chronojump 2.1.3, backups contain the complete data.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             </child>
                                                             </widget>
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 2ead7032f..b84f4da95 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -301,6 +301,7 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.VBox vbox_micro_discover;
        [Widget] Gtk.Label label_micro_discover_title;
        [Widget] Gtk.Table table_micro_discover;
+       [Widget] Gtk.VBox vbox_contacts_detect_and_execute;
        [Widget] Gtk.Button button_contacts_detect;
        [Widget] Gtk.Label label_micro_discover_ports;
        [Widget] Gtk.Label label_micro_discover_ports_detecting;
@@ -3581,7 +3582,7 @@ public partial class ChronoJumpWindow
                vbox_event_execute_drawingarea_run_interval_realtime_capture_cairo.Visible = false;
 
                button_contacts_detect.Visible = false;
-               button_execute_test.Visible = true;
+               vbox_contacts_detect_and_execute.Visible = true;
 
                //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
@@ -3687,7 +3688,7 @@ public partial class ChronoJumpWindow
                                button_execute_test_show_connect_or_execute(! 
cp2016.SuccededConnectContactsRealThread);
 
                        button_contacts_detect.Visible = true;
-                       button_execute_test.Visible = false;
+                       vbox_contacts_detect_and_execute.Visible = false;
 
                        notebook_sup.CurrentPage = Convert.ToInt32(notebook_sup_pages.CONTACTS);
                        //notebook_capture_analyze.ShowTabs = true;
@@ -3875,7 +3876,7 @@ public partial class ChronoJumpWindow
                {
                        button_execute_test_show_connect_or_execute(false);
                        button_contacts_detect.Visible = true;
-                       button_execute_test.Visible = false;
+                       vbox_contacts_detect_and_execute.Visible = false;
 
                        notebook_sup.CurrentPage = Convert.ToInt32(notebook_sup_pages.CONTACTS);
                        notebooks_change(m);
@@ -3925,7 +3926,7 @@ public partial class ChronoJumpWindow
                {
                        button_execute_test_show_connect_or_execute(false);
                        button_contacts_detect.Visible = true;
-                       button_execute_test.Visible = false;
+                       vbox_contacts_detect_and_execute.Visible = false;
 
                        notebook_sup.CurrentPage = Convert.ToInt32(notebook_sup_pages.CONTACTS);
                        notebooks_change(m);
@@ -4782,9 +4783,13 @@ public partial class ChronoJumpWindow
                for (int i = 0 ; i < button_microNotDiscovered_l.Count; i ++)
                        if(button_microNotDiscovered_l[i] == bPress)
                        {
-                               new DialogMessage(Constants.MessageTypes.INFO,
-                                               "selected port: " + label_micro_discover_l[i].Text);
+                               forceSensorPortName = microDiscover.PortName_l[i];
+                               LogB.Information(forceSensorPortName);
+
+                               button_contacts_detect.Visible = false;
+                               vbox_contacts_detect_and_execute.Visible = true;
                                on_button_micro_discover_cancel_close_clicked (new object (), new EventArgs 
());
+
                                return;
                        }
        }


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