action_spec = (_('Save to disk'), 'save.png', None, _('S'))
action_type = 'current'
def genesis(self):
self.qaction.triggered.connect(self.save_to_disk)
self.save_menu = QMenu()
self.save_menu.addAction(_('Save to disk'), partial(self.save_to_disk, False))
self.save_menu.addAction(_('Save to disk in a single directory'), partial(self.save_to_single_dir, False))
self.save_menu.addAction(_('Save only %s format to disk') % prefs['output_format'].upper(), partial(self.save_single_format_to_disk, False))
self.save_menu.addAction(_('Save only %s format to disk in a single directory') % prefs['output_format'].upper(), partial(self.save_single_fmt_to_single_dir, False))
return error_dialog(self.gui, _('Not allowed'), _('You are trying to save files into the calibre library. This can cause corruption of your library. Save to disk is meant to export files from your calibre library elsewhere.'), show = True)
def _books_saved(self, path, failures, error):
self._saver = None
if error:
return error_dialog(self.gui, _('Error while saving'), _('There was an error while saving.'), error, show = True)