550 first_line, first_column, last_line, last_column, error = result.groups() |
550 first_line, first_column, last_line, last_column, error = result.groups() |
551 infos = self.CTR.ShowError(self.Log, |
551 infos = self.CTR.ShowError(self.Log, |
552 (int(first_line), int(first_column)), |
552 (int(first_line), int(first_column)), |
553 (int(last_line), int(last_column))) |
553 (int(last_line), int(last_column))) |
554 |
554 |
555 ## Function displaying an Error dialog in PLCOpenEditor. |
|
556 # @return False if closing cancelled. |
|
557 def CheckSaveBeforeClosing(self, title=_("Close Project")): |
555 def CheckSaveBeforeClosing(self, title=_("Close Project")): |
|
556 """Function displaying an Error dialog in PLCOpenEditor. |
|
557 |
|
558 :returns: False if closing cancelled. |
|
559 """ |
558 if self.CTR.ProjectTestModified(): |
560 if self.CTR.ProjectTestModified(): |
559 dialog = wx.MessageDialog(self, |
561 dialog = wx.MessageDialog(self, |
560 _("There are changes, do you want to save?"), |
562 _("There are changes, do you want to save?"), |
561 title, |
563 title, |
562 wx.YES_NO | wx.CANCEL | wx.ICON_QUESTION) |
564 wx.YES_NO | wx.CANCEL | wx.ICON_QUESTION) |