Example #1
0
 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()
Example #2
0
 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")
Example #3
0
 def _viewErrorsButtonClickedCb(self, unused_button):
     """
     Show a FileListErrorDialog to display import _errors.
     """
     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."))
     self._error_dialogbox = FileListErrorDialog(*msgs)
     self._error_dialogbox.connect("close", self._errorDialogBoxCloseCb)
     self._error_dialogbox.connect("response",
                                   self._errorDialogBoxResponseCb)
     for uri, reason, extra in self._errors:
         self._error_dialogbox.addFailedFile(uri, reason, extra)
     self._error_dialogbox.window.show()
     # Reset the error list, since the user has read them.
     self._resetErrorList()