From dc97cffbec074d63f1ac0913f2564d0284a811a7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 15 Jun 2022 09:19:09 +0530 Subject: [PATCH] Links to open search results --- src/calibre/gui2/fts/search.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/fts/search.py b/src/calibre/gui2/fts/search.py index a29d258e82..78f79b4bc6 100644 --- a/src/calibre/gui2/fts/search.py +++ b/src/calibre/gui2/fts/search.py @@ -578,7 +578,13 @@ class ResultDetails(QWidget): continue text = result['text'] text = markup_text(prepare_string_for_xml(text)) - html.append(f'

{text}

') + html.append('
') + for fmt in formats: + fmt = fmt.upper() + tt = _('Open the book, in the {fmt} format.\nWhen using the calibre viewer, it will attempt to scroll\nto this search result automatically.' + ).format(fmt=fmt) + html.append(f'{fmt}\xa0 ') + html.append(f'

{text}

') self.results.setHtml('\n'.join(html))