546 if self.CTR is not None: |
546 if self.CTR is not None: |
547 result = MATIEC_ERROR_MODEL.match(line) |
547 result = MATIEC_ERROR_MODEL.match(line) |
548 if result is not None: |
548 if result is not None: |
549 first_line, first_column, last_line, last_column, error = result.groups() |
549 first_line, first_column, last_line, last_column, error = result.groups() |
550 infos = self.CTR.ShowError(self.Log, |
550 infos = self.CTR.ShowError(self.Log, |
551 (int(first_line), int(first_column)), |
551 (int(first_line), int(first_column)), |
552 (int(last_line), int(last_column))) |
552 (int(last_line), int(last_column))) |
553 |
553 |
554 ## Function displaying an Error dialog in PLCOpenEditor. |
554 ## Function displaying an Error dialog in PLCOpenEditor. |
555 # @return False if closing cancelled. |
555 # @return False if closing cancelled. |
556 def CheckSaveBeforeClosing(self, title=_("Close Project")): |
556 def CheckSaveBeforeClosing(self, title=_("Close Project")): |
557 if self.CTR.ProjectTestModified(): |
557 if self.CTR.ProjectTestModified(): |
882 try: |
882 try: |
883 defaultpath = DecodeFileSystemPath(self.Config.Read("lastopenedfolder")) |
883 defaultpath = DecodeFileSystemPath(self.Config.Read("lastopenedfolder")) |
884 except: |
884 except: |
885 defaultpath = os.path.expanduser("~") |
885 defaultpath = os.path.expanduser("~") |
886 |
886 |
887 dialog = wx.DirDialog(self, _("Choose a project"), defaultpath, style=wx.DEFAULT_DIALOG_STYLE | |
887 dialog = wx.DirDialog(self, _("Choose a project"), defaultpath, |
888 wx.RESIZE_BORDER) |
888 style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER) |
889 if dialog.ShowModal() == wx.ID_OK: |
889 if dialog.ShowModal() == wx.ID_OK: |
890 self.OpenProject(dialog.GetPath()) |
890 self.OpenProject(dialog.GetPath()) |
891 dialog.Destroy() |
891 dialog.Destroy() |
892 |
892 |
893 def OpenProject(self, projectpath): |
893 def OpenProject(self, projectpath): |