mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
...
This commit is contained in:
parent
e333001d31
commit
020cb2eeb8
@ -366,10 +366,12 @@ class DeleteAction(InterfaceAction):
|
||||
self.remove_matching_books_from_device()
|
||||
# The following will run if the selected books are not on a connected device.
|
||||
# The user has selected to delete from the library or the device and library.
|
||||
if not confirm('<p>'+_('The %d selected book(s) will be '
|
||||
'<b>permanently deleted</b> and the files '
|
||||
'removed from your calibre library. Are you sure?')%len(to_delete_ids) +
|
||||
'</p>', 'library_delete_books', self.gui):
|
||||
if not confirm('<p>'+ngettext(
|
||||
'The selected book will be <b>permanently deleted</b> and the files '
|
||||
'removed from your calibre library. Are you sure?',
|
||||
'The {} selected books will be <b>permanently deleted</b> and the files '
|
||||
'removed from your calibre library. Are you sure?', len(to_delete_ids)).format(len(to_delete_ids)),
|
||||
'library_delete_books', self.gui):
|
||||
return
|
||||
if len(to_delete_ids) < 5:
|
||||
try:
|
||||
@ -413,10 +415,10 @@ class DeleteAction(InterfaceAction):
|
||||
view = self.gui.card_b_view
|
||||
paths = view.model().paths(rows)
|
||||
ids = view.model().indices(rows)
|
||||
if not confirm('<p>'+_('The %d selected book(s) will be '
|
||||
'<b>permanently deleted</b> '
|
||||
'from your device. Are you sure?')%len(paths) +
|
||||
'</p>', 'device_delete_books', self.gui):
|
||||
if not confirm('<p>'+ngettext(
|
||||
'The selected book will be <b>permanently deleted</b> from your device. Are you sure?',
|
||||
'The {} selected books will be <b>permanently deleted</b> from your device. Are you sure?', len(paths)).format(len(paths)),
|
||||
'device_delete_books', self.gui):
|
||||
return
|
||||
job = self.gui.remove_paths(paths)
|
||||
self.delete_memory[job] = (paths, view.model())
|
||||
|
@ -12,7 +12,7 @@ from functools import partial
|
||||
from threading import Thread
|
||||
|
||||
from PyQt5.Qt import (QIcon, QDialog,
|
||||
QDialogButtonBox, QLabel, QGridLayout, QPixmap, Qt)
|
||||
QDialogButtonBox, QLabel, QGridLayout, Qt)
|
||||
|
||||
from calibre.gui2.threaded_jobs import ThreadedJob
|
||||
from calibre.ebooks.metadata.opf2 import metadata_to_opf
|
||||
@ -62,12 +62,15 @@ class ConfirmDialog(QDialog):
|
||||
self.setLayout(l)
|
||||
|
||||
i = QLabel(self)
|
||||
i.setPixmap(QPixmap(I('download-metadata.png')))
|
||||
i.setPixmap(QIcon(I('download-metadata.png')).pixmap(128, 128))
|
||||
l.addWidget(i, 0, 0)
|
||||
t = ngettext(
|
||||
'The download of metadata for the <b>selected book</b> will run in the background. Proceed?',
|
||||
'The download of metadata for the <b>{} selected books</b> will run in the background. Proceed?',
|
||||
len(ids)).format(len(ids))
|
||||
|
||||
t = QLabel(
|
||||
'<p>'+_('The download of metadata for the <b>%d selected book(s)</b> will'
|
||||
' run in the background. Proceed?')%len(ids) +
|
||||
'<p>'+ t +
|
||||
'<p>'+_('You can monitor the progress of the download '
|
||||
'by clicking the rotating spinner in the bottom right '
|
||||
'corner.') +
|
||||
|
Loading…
x
Reference in New Issue
Block a user