mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Improvement found while testing: give selected books to the formatter in CoverView.
This commit is contained in:
parent
855520cc08
commit
f939f85498
@ -51,7 +51,15 @@ class CoverView(LazyConfigWidgetBase, Ui_Form):
|
|||||||
'list. This option has no effect when using the Wide user interface layout.'))
|
'list. This option has no effect when using the Wide user interface layout.'))
|
||||||
|
|
||||||
def edit_cb_title_template(self):
|
def edit_cb_title_template(self):
|
||||||
t = TemplateDialog(self, self.opt_cover_browser_title_template.text(), fm=self.gui.current_db.field_metadata)
|
rows = self.gui.library_view.selectionModel().selectedRows()
|
||||||
|
mi = None
|
||||||
|
db = self.gui.current_db.new_api
|
||||||
|
if rows:
|
||||||
|
ids = list(map(self.gui.library_view.model().id, rows))
|
||||||
|
mi = []
|
||||||
|
for bk in ids[0:min(10, len(ids))]:
|
||||||
|
mi.append(db.get_proxy_metadata(bk))
|
||||||
|
t = TemplateDialog(self, self.opt_cover_browser_title_template.text(), mi=mi, fm=db.field_metadata)
|
||||||
t.setWindowTitle(_('Edit template for caption'))
|
t.setWindowTitle(_('Edit template for caption'))
|
||||||
if t.exec():
|
if t.exec():
|
||||||
self.opt_cover_browser_title_template.setText(t.rule[1])
|
self.opt_cover_browser_title_template.setText(t.rule[1])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user