9575:635b6c5a36e1 | 9576:be9f8e7e42e0 |
---|---|
3399 except (OSError, Utilities.CodingError, UnicodeError) as why: | 3399 except (OSError, Utilities.CodingError, UnicodeError) as why: |
3400 EricMessageBox.critical( | 3400 EricMessageBox.critical( |
3401 self, | 3401 self, |
3402 self.tr("Save File"), | 3402 self.tr("Save File"), |
3403 self.tr( | 3403 self.tr( |
3404 "<p>The file <b>{0}</b> could not be saved.<br/>" "Reason: {1}</p>" | 3404 "<p>The file <b>{0}</b> could not be saved.<br/>Reason: {1}</p>" |
3405 ).format(fn, str(why)), | 3405 ).format(fn, str(why)), |
3406 ) | 3406 ) |
3407 return False | 3407 return False |
3408 | 3408 |
3409 def __getSaveFileName(self, path=None): | 3409 def __getSaveFileName(self, path=None): |
3456 if fpath.exists(): | 3456 if fpath.exists(): |
3457 res = EricMessageBox.yesNo( | 3457 res = EricMessageBox.yesNo( |
3458 self, | 3458 self, |
3459 self.tr("Save File"), | 3459 self.tr("Save File"), |
3460 self.tr( | 3460 self.tr( |
3461 "<p>The file <b>{0}</b> already exists." " Overwrite it?</p>" | 3461 "<p>The file <b>{0}</b> already exists. Overwrite it?</p>" |
3462 ).format(fpath), | 3462 ).format(fpath), |
3463 icon=EricMessageBox.Warning, | 3463 icon=EricMessageBox.Warning, |
3464 ) | 3464 ) |
3465 if not res: | 3465 if not res: |
3466 return "" | 3466 return "" |
6983 if fpath.exists(): | 6983 if fpath.exists(): |
6984 res = EricMessageBox.yesNo( | 6984 res = EricMessageBox.yesNo( |
6985 self, | 6985 self, |
6986 self.tr("Save macro"), | 6986 self.tr("Save macro"), |
6987 self.tr( | 6987 self.tr( |
6988 "<p>The macro file <b>{0}</b> already exists." " Overwrite it?</p>" | 6988 "<p>The macro file <b>{0}</b> already exists. Overwrite it?</p>" |
6989 ).format(fpath), | 6989 ).format(fpath), |
6990 icon=EricMessageBox.Warning, | 6990 icon=EricMessageBox.Warning, |
6991 ) | 6991 ) |
6992 if not res: | 6992 if not res: |
6993 return | 6993 return |