mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1890239 [[Enhancement] Show number of books being converted in window title of the Bulk convert window](https://bugs.launchpad.net/calibre/+bug/1890239)
This commit is contained in:
parent
fe7976b8b8
commit
b0a613a0c1
@ -27,10 +27,14 @@ from polyglot.builtins import unicode_type, native_string_type
|
||||
class BulkConfig(Config):
|
||||
|
||||
def __init__(self, parent, db, preferred_output_format=None,
|
||||
has_saved_settings=True):
|
||||
has_saved_settings=True, book_ids=()):
|
||||
QDialog.__init__(self, parent)
|
||||
self.widgets = []
|
||||
self.setupUi()
|
||||
try:
|
||||
self.num_of_books = len(book_ids)
|
||||
except Exception:
|
||||
self.num_of_books = 1
|
||||
|
||||
self.setup_output_formats(db, preferred_output_format)
|
||||
self.db = db
|
||||
@ -82,7 +86,9 @@ class BulkConfig(Config):
|
||||
return cls(self, self.plumber.get_option_by_name,
|
||||
self.plumber.get_option_help, self.db)
|
||||
|
||||
self.setWindowTitle(_('Bulk convert'))
|
||||
self.setWindowTitle(
|
||||
ngettext(_('Bulk convert one book'), _('Bulk convert {} books'), self.num_of_books).format(self.num_of_books)
|
||||
)
|
||||
lf = widget_factory(LookAndFeelWidget)
|
||||
hw = widget_factory(HeuristicsWidget)
|
||||
sr = widget_factory(SearchAndReplaceWidget)
|
||||
|
@ -142,7 +142,7 @@ def convert_bulk_ebook(parent, queue, db, book_ids, out_format=None, args=[]):
|
||||
has_saved_settings = db.has_conversion_options(book_ids)
|
||||
|
||||
d = BulkConfig(parent, db, out_format,
|
||||
has_saved_settings=has_saved_settings)
|
||||
has_saved_settings=has_saved_settings, book_ids=book_ids)
|
||||
if d.exec_() != QDialog.Accepted:
|
||||
return None
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user