From f3656abbcc7c5645e22bed6887ac19ab2cb802fa Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Tue, 13 Oct 2020 10:11:24 +0100 Subject: [PATCH] Allow access to the full template editor when creating/editing composite columns --- src/calibre/gui2/preferences/create_custom_column.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/preferences/create_custom_column.py b/src/calibre/gui2/preferences/create_custom_column.py index 1310933a92..1ff57c821d 100644 --- a/src/calibre/gui2/preferences/create_custom_column.py +++ b/src/calibre/gui2/preferences/create_custom_column.py @@ -17,6 +17,7 @@ from PyQt5.Qt import ( ) from calibre.gui2 import error_dialog +from calibre.gui2.dialogs.template_line_editor import TemplateLineEditor from calibre.utils.date import parse_date, UNDEFINED_DATE from polyglot.builtins import iteritems, unicode_type, range, map @@ -326,7 +327,7 @@ class CreateCustomColumn(QDialog): self.format_label = add_row('', h) # Template - self.composite_box = cb = QLineEdit(self) + self.composite_box = cb = TemplateLineEditor(self) self.composite_default_label = cdl = QLabel(_("Default: (nothing)")) cb.setToolTip(_("Field template. Uses the same syntax as save templates.")) cdl.setToolTip(_("Similar to save templates. For example, %s") % "{title} {isbn}")