567 if fpath.exists(): |
567 if fpath.exists(): |
568 res = EricMessageBox.yesNo( |
568 res = EricMessageBox.yesNo( |
569 self, |
569 self, |
570 self.tr("Save Chat"), |
570 self.tr("Save Chat"), |
571 self.tr("<p>The file <b>{0}</b> already exists." |
571 self.tr("<p>The file <b>{0}</b> already exists." |
572 " Overwrite it?</p>").format(str(fpath)), |
572 " Overwrite it?</p>").format(fpath), |
573 icon=EricMessageBox.Warning) |
573 icon=EricMessageBox.Warning) |
574 if not res: |
574 if not res: |
575 return |
575 return |
576 |
576 |
577 try: |
577 try: |
581 EricMessageBox.critical( |
581 EricMessageBox.critical( |
582 self, |
582 self, |
583 self.tr("Error saving Chat"), |
583 self.tr("Error saving Chat"), |
584 self.tr("""<p>The chat contents could not be""" |
584 self.tr("""<p>The chat contents could not be""" |
585 """ written to <b>{0}</b></p>""" |
585 """ written to <b>{0}</b></p>""" |
586 """<p>Reason: {1}</p>""") .format( |
586 """<p>Reason: {1}</p>""") |
587 str(fpath), str(err))) |
587 .format(fpath, str(err))) |
588 |
588 |
589 def __copyChat(self): |
589 def __copyChat(self): |
590 """ |
590 """ |
591 Private slot to copy the contents of the chat display to the clipboard. |
591 Private slot to copy the contents of the chat display to the clipboard. |
592 """ |
592 """ |