Adding compile button when unconnected
authorlaurent
Wed, 02 Jun 2010 16:52:58 +0200
changeset 541 4d9ca788205e
parent 539 6ff2c1d34640
child 542 1b0f72deeb99
Adding compile button when unconnected
LPCBeremiz.py
--- a/LPCBeremiz.py	Wed Jun 02 16:35:00 2010 +0200
+++ b/LPCBeremiz.py	Wed Jun 02 16:52:58 2010 +0200
@@ -386,6 +386,10 @@
          "shown" : False,
          "tooltip" : _("Stop Running PLC"),
          "method" : "_Stop"},
+        {"bitmap" : opjimg("Build"),
+         "name" : _("Build"),
+         "tooltip" : _("Build project into build folder"),
+         "method" : "_build"},
         {"bitmap" : opjimg("Transfer"),
          "name" : _("Transfer"),
          "shown" : False,
@@ -592,18 +596,22 @@
                      "Started" :     [("_Simulate", False),
                                       ("_Run", False),
                                       ("_Stop", True),
+                                      ("_build", False),
                                       ("_Transfer", False)],
                      "Stopped" :     [("_Simulate", True),
                                       ("_Run", True),
                                       ("_Stop", False),
+                                      ("_build", False),
                                       ("_Transfer", False)],
                      "Connected" :   [("_Simulate", not simulating),
                                       ("_Run", False),
                                       ("_Stop", simulating),
+                                      ("_build", False),
                                       ("_Transfer", True)],
                      "Disconnected" :[("_Simulate", not simulating),
                                       ("_Run", False),
                                       ("_Stop", simulating),
+                                      ("_build", True),
                                       ("_Transfer", False)],
                    }.get(status,[]):
                 self.ShowMethod(*args)
@@ -1144,6 +1152,7 @@
             if frame is not None:
                 self.PluginRoot.SetAppFrame(frame, frame.Log)
                 wx.CallAfter(frame.Show)
+                wx.CallAfter(frame.Raise)
         
         def Refresh(self):
             global frame