# HG changeset patch # User Schlumpf # Date 1552667664 -3600 # Node ID f5891ce3228eefe54868e117856f479b30e60d8a # Parent 1378c18402c3f651f309de1bea445ab2262562dc Add "Generate Program" to toolbar in PLCOpenEditor standalone mode. Currently you can find the "Generate Program" action only in the file menu, but this action is very often used in standalone mode, so I added toolbuffon. diff -r 1378c18402c3 -r f5891ce3228e PLCOpenEditor.py --- a/PLCOpenEditor.py Mon Mar 11 17:20:15 2019 +0100 +++ b/PLCOpenEditor.py Fri Mar 15 17:34:24 2019 +0100 @@ -118,7 +118,8 @@ (wx.ID_OPEN, "open", _(u'Open'), None), (wx.ID_SAVE, "save", _(u'Save'), None), (wx.ID_SAVEAS, "saveas", _(u'Save As...'), None), - (wx.ID_PRINT, "print", _(u'Print'), None)]) + (wx.ID_PRINT, "print", _(u'Print'), None), + (ID_PLCOPENEDITORFILEMENUGENERATE, "Build", _(u'Generate Program'), None)]) def _init_coll_HelpMenu_Items(self, parent): AppendMenu(parent, help='', id=wx.ID_HELP, @@ -232,6 +233,7 @@ self.FileMenu.Enable(wx.ID_SAVEAS, True) MenuToolBar.EnableTool(wx.ID_SAVEAS, True) self.FileMenu.Enable(ID_PLCOPENEDITORFILEMENUGENERATE, True) + MenuToolBar.EnableTool(ID_PLCOPENEDITORFILEMENUGENERATE, True) else: self.FileMenu.Enable(wx.ID_CLOSE, False) self.FileMenu.Enable(wx.ID_PAGE_SETUP, False) @@ -245,6 +247,7 @@ self.FileMenu.Enable(wx.ID_SAVEAS, False) MenuToolBar.EnableTool(wx.ID_SAVEAS, False) self.FileMenu.Enable(ID_PLCOPENEDITORFILEMENUGENERATE, False) + MenuToolBar.EnableTool(ID_PLCOPENEDITORFILEMENUGENERATE, False) def OnNewProjectMenu(self, event): if self.Controler is not None and not self.CheckSaveBeforeClosing():