PLCOpenEditor.py
changeset 2498 516ff0a85a9e
parent 2497 e04824ad26e4
child 2531 f5891ce3228e
equal deleted inserted replaced
2496:39049d615c0d 2498:516ff0a85a9e
   303 
   303 
   304     def OnSaveProjectAsMenu(self, event):
   304     def OnSaveProjectAsMenu(self, event):
   305         self.SaveProjectAs()
   305         self.SaveProjectAs()
   306 
   306 
   307     def OnGenerateProgramMenu(self, event):
   307     def OnGenerateProgramMenu(self, event):
   308         dialog = wx.FileDialog(self, _("Choose a file"), os.getcwd(), self.Controler.GetProgramFilePath(),  _("ST files (*.st)|*.st|All files|*.*"), wx.SAVE | wx.CHANGE_DIR)
   308         dialog = wx.FileDialog(self, _("Choose a file"), os.getcwd(), os.path.basename(self.Controler.GetProgramFilePath()),  _("ST files (*.st)|*.st|All files|*.*"), wx.SAVE | wx.CHANGE_DIR)
   309         if dialog.ShowModal() == wx.ID_OK:
   309         if dialog.ShowModal() == wx.ID_OK:
   310             filepath = dialog.GetPath()
   310             filepath = dialog.GetPath()
   311             message_text = ""
   311             message_text = ""
   312             header, icon = _("Done"), wx.ICON_INFORMATION
   312             header, icon = _("Done"), wx.ICON_INFORMATION
   313             if os.path.isdir(os.path.dirname(filepath)):
   313             if os.path.isdir(os.path.dirname(filepath)):