def _questionButtonClickedCb(self, unused_button): msgs = (_("Error List"), _("The following errors have been reported:")) # show error dialog dbox = FileListErrorDialog(*msgs) dbox.connect("close", self._errorDialogBoxCloseCb) dbox.connect("response", self._errorDialogBoxResponseCb) for reason, extra in self.errors: dbox.addFailedFile(None, reason, extra) dbox.show() # reset error list self.errors = [] self.hide()
def _questionButtonClickedCb(self, unused_button): if len(self.errors) > 1: msgs = (_("Error while analyzing files"), _("The following files can not be used with PiTiVi.")) else: msgs = (_("Error while analyzing a file"), _("The following file can not be used with PiTiVi.")) # show error dialog dbox = FileListErrorDialog(*msgs) dbox.connect("close", self._errorDialogBoxCloseCb) dbox.connect("response", self._errorDialogBoxResponseCb) for uri, reason, extra in self.errors: dbox.addFailedFile(uri, reason, extra) dbox.show() # reset error list self.errors = [] self.hide() self.emit("remove-me")