[chronojump] Chronopic macosx message shown on chronopic window without opening new window



commit 24eea245e03e9361058e6a7965fb40dc04e90c60
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Feb 13 12:57:38 2017 +0100

    Chronopic macosx message shown on chronopic window without opening new window

 src/gui/chronopicRegister.cs |   23 ++++++++---------------
 1 files changed, 8 insertions(+), 15 deletions(-)
---
diff --git a/src/gui/chronopicRegister.cs b/src/gui/chronopicRegister.cs
index 01b052e..50e3b99 100644
--- a/src/gui/chronopicRegister.cs
+++ b/src/gui/chronopicRegister.cs
@@ -64,6 +64,7 @@ public class ChronopicRegisterWindow
 {
        Gtk.Window chronopic_register_win;
        Gtk.VBox vbox_main;
+       Gtk.Label label_macOSX;
        public Gtk.Button FakeButtonCloseSerialPort;
 
        public ChronopicRegisterWindow(Gtk.Window app1, List<ChronopicRegisterPort> list)
@@ -318,13 +319,17 @@ public class ChronopicRegisterWindow
 
        private void createButtons()
        {
+               label_macOSX = new Gtk.Label();
+               label_macOSX.Text = Catalog.GetString("There is a known problem with MacOSX:") + "\n" +
+                               Catalog.GetString("If Chronopic is disconnected after jumps or runs 
execution,\nthat port will be blocked until restart of machine.") + "\n\n" +
+                               Catalog.GetString("We are working on a solution.");
+               if( UtilAll.GetOSEnum() == UtilAll.OperatingSystems.MACOSX)
+                       vbox_main.Add(label_macOSX);
+
                FakeButtonCloseSerialPort = new Gtk.Button();
                Gtk.Button button_close_serial_port = new Gtk.Button("Close serial port (debug)");
                button_close_serial_port.Clicked += new EventHandler(on_button_close_serial_port_clicked);
 
-               Gtk.Button button_OSX_readme = new Gtk.Button("MacOSX Readme");
-               button_OSX_readme.Clicked += new EventHandler(on_button_OSX_readme_clicked);
-
                //---- button close start --->
                Gtk.Button button_close = new Gtk.Button("Close Window");
                button_close.Clicked += new EventHandler(on_button_close_clicked);
@@ -342,9 +347,6 @@ public class ChronopicRegisterWindow
                Gtk.HButtonBox hbox = new Gtk.HButtonBox ();
                //hbox.Add(button_close_serial_port);
 
-               if( UtilAll.GetOSEnum() == UtilAll.OperatingSystems.MACOSX)
-                       hbox.Add(button_OSX_readme);
-
                hbox.Add(button_close);
 
                vbox_main.Add(hbox);
@@ -356,15 +358,6 @@ public class ChronopicRegisterWindow
                FakeButtonCloseSerialPort.Click();
        }
 
-       private void on_button_OSX_readme_clicked(object o, EventArgs args)
-       {
-               new DialogMessage(Constants.MessageTypes.INFO,
-                               Catalog.GetString("There is a known problem with MacOSX:") + "\n" +
-                               Catalog.GetString("If Chronopic is disconnected after jumps or runs 
execution, that port will be blocked until restart of machine") + "\n\n" +
-                               Catalog.GetString("We are working on a solution.")
-                               );
-       }
-
        private void on_button_close_clicked(object o, EventArgs args)
        {
                chronopic_register_win.Hide();


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