# HG changeset patch # User laurent # Date 1275490378 -7200 # Node ID 4d9ca788205e1d45077e0f13ca5913cd5dff5ca9 # Parent 6ff2c1d346406ad1891940f0b3475b290879fb56 Adding compile button when unconnected diff -r 6ff2c1d34640 -r 4d9ca788205e 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