[chronojump] If encoder is missing on networks: do not open device window



commit dc69da7ccb30a6f54cba13cfb34755491060ada8
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Nov 7 13:12:37 2019 +0100

    If encoder is missing on networks: do not open device window

 src/gui/encoder.cs | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 99123164..8afa82cd 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -698,11 +698,21 @@ public partial class ChronoJumpWindow
                LogB.Information("numEncoders: " + numEncoders);
                if(numEncoders == 0)
                {
-                       //open device window
-                       on_chronopic_encoder_clicked(new object(), new EventArgs());
+                       //show viewport chronopic encoder with a color
                        UtilGtk.DeviceColors(viewport_chronopic_encoder, false);
+
+                       //if networks (compujump) show the label and image of missing
                        if(configChronojump.Compujump)
                                networksShowDeviceMissingEncoder(true);
+                       else {
+                               /*
+                                * if not on networks (compujump): open device window.
+                                * this is not done on networks because we prefer that a responsible
+                                * manages correctly the two devices (encoder and rfid)
+                                * and this responsible first need to "gain permission" on 
preferences/advanced
+                                */
+                               on_chronopic_encoder_clicked(new object(), new EventArgs());
+                       }
 
                        return false;
                }


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