[chronojump] microDiscover win show message if no ports found



commit d6bb89e7bd9cdceae96c463fb9ff34bb3f8a1045
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue May 24 13:57:41 2022 +0200

    microDiscover win show message if no ports found

 glade/app1.glade             | 46 +++++++++++++++++++++++++++++++-------------
 src/gui/app1/chronojump.cs   |  2 ++
 src/gui/chronopicRegister.cs |  5 +++++
 3 files changed, 40 insertions(+), 13 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 94abd3cfd..917dd65ad 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -26999,6 +26999,9 @@ Concentric</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -33407,6 +33410,18 @@ Concentric</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">6</property>
                                                             <child>
+                                                            <widget class="GtkLabel" 
id="label_video_encoder_tests_will_be_filmed">
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" translatable="yes">Tests 
will be filmed</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="pack_type">end</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
                                                             <widget class="GtkHBox" 
id="hbox_video_encoder_capturing">
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">4</property>
@@ -33443,18 +33458,6 @@ Concentric</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkLabel" 
id="label_video_encoder_tests_will_be_filmed">
-                                                            <property name="can_focus">False</property>
-                                                            <property name="label" translatable="yes">Tests 
will be filmed</property>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="pack_type">end</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
                                                             <widget class="GtkHBox" 
id="hbox_video_encoder_no_capturing">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
@@ -42807,6 +42810,9 @@ then click this button.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -50749,6 +50755,17 @@ Since Chronojump 2.1.3, backups contain the complete data.</property>
                                                             <property name="border_width">20</property>
                                                             <property name="spacing">20</property>
                                                             <child>
+                                                            <widget class="GtkLabel" 
id="label_micro_discover_not_found">
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" 
translatable="yes">label</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
                                                             <widget class="GtkScrolledWindow" 
id="scrolledwindow29">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
@@ -50792,6 +50809,9 @@ Since Chronojump 2.1.3, backups contain the complete data.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             </child>
                                                             </widget>
@@ -50800,7 +50820,7 @@ Since Chronojump 2.1.3, backups contain the complete data.</property>
                                                             <packing>
                                                             <property name="expand">True</property>
                                                             <property name="fill">True</property>
-                                                            <property name="position">0</property>
+                                                            <property name="position">1</property>
                                                             </packing>
                                                             </child>
                                                             </widget>
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 56dc8ec43..9cf828661 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -300,6 +300,7 @@ public partial class ChronoJumpWindow
        //detect devices
        [Widget] Gtk.VBox vbox_micro_discover;
        [Widget] Gtk.Label label_micro_discover_title;
+       [Widget] Gtk.Label label_micro_discover_not_found;
        [Widget] Gtk.Table table_micro_discover;
        [Widget] Gtk.HBox hbox_contacts_detect_and_execute;
        [Widget] Gtk.Button button_contacts_detect;
@@ -4562,6 +4563,7 @@ public partial class ChronoJumpWindow
                label_micro_discover_title.UseMarkup = true;
 
                discoverWin = new DiscoverWindow (current_mode, chronopicRegister,
+                       label_micro_discover_not_found,
                        table_micro_discover,
                        image_button_micro_discover_cancel_close,
                        label_button_micro_discover_cancel_close);
diff --git a/src/gui/chronopicRegister.cs b/src/gui/chronopicRegister.cs
index 3f4306b61..6c32f9c95 100644
--- a/src/gui/chronopicRegister.cs
+++ b/src/gui/chronopicRegister.cs
@@ -140,6 +140,7 @@ public class DiscoverWindow
        private string portSelected;
 
        public DiscoverWindow (Constants.Modes current_mode, ChronopicRegister chronopicRegister,
+                       Gtk.Label label_micro_discover_not_found,
                        Gtk.Table table_micro_discover,
                        Gtk.Image image_button_micro_discover_cancel_close,
                        Gtk.Label label_button_micro_discover_cancel_close)
@@ -182,6 +183,7 @@ public class DiscoverWindow
                {
                        microDiscover = new MicroDiscover (notDiscovered_l);
 
+                       label_micro_discover_not_found.Visible = false;
                        setup_table_micro_discover_l (alreadyDiscovered_l, notDiscovered_l);
                        discoverCloseAfterCancel = false;
 
@@ -191,6 +193,9 @@ public class DiscoverWindow
                } else {
                        UtilGtk.RemoveChildren (table_micro_discover);
 
+                       label_micro_discover_not_found.Text = Catalog.GetString ("Device not found.");
+                       label_micro_discover_not_found.Visible = true;
+
                        image_button_micro_discover_cancel_close.Pixbuf =
                                new Pixbuf (null, Util.GetImagePath (false) + "image_close.png");
                        label_button_micro_discover_cancel_close.Text = Catalog.GetString("Close");


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