diff --git a/imgsrc/fts.svg b/imgsrc/fts.svg new file mode 100644 index 0000000000..7f488edf87 --- /dev/null +++ b/imgsrc/fts.svg @@ -0,0 +1,68 @@ + + + + diff --git a/manual/gui.rst b/manual/gui.rst index cbdb970bb8..f7d95beed1 100644 --- a/manual/gui.rst +++ b/manual/gui.rst @@ -549,15 +549,16 @@ Now you can access your saved search in the Tag browser under :guilabel:`Saved s Searching the full text of all books --------------------------------------- -calibre can *optionally* index the full text of books in the library to allow -for instant searching of words inside any book. To enable this functionality -go to :guilabel:`Preferences->Toolbars & menus->The main toolbar` and add the -:guilabel:`Search full text` button to the toolbar. +.. |ftsb| image:: images/fts-button.png + :class: float-right-img -Click the newly added button to show the full text search window. Enable -indexing for the current library. Once indexing is complete you can search all -the text in the full library. When you add new books to the library, they will -be automatically indexed in the background. +|ftsb| calibre can *optionally* index the full text of books in the library to allow +for instant searching of words inside any book. To use this functionality +click the :guilabel:`FT` button at the left edge of the search bar. + +Then, enable indexing for the current library. Once indexing is complete you can +search all the text in the full library. When you add new books to the library, +they will be automatically indexed in the background. Virtual libraries ------------------- diff --git a/manual/images/fts-button.png b/manual/images/fts-button.png new file mode 100644 index 0000000000..8d2afada1c Binary files /dev/null and b/manual/images/fts-button.png differ diff --git a/resources/images/fts.png b/resources/images/fts.png new file mode 100644 index 0000000000..50aaba84b5 Binary files /dev/null and b/resources/images/fts.png differ diff --git a/src/calibre/gui2/actions/fts.py b/src/calibre/gui2/actions/fts.py index 4a48af3f8d..e67f47f2da 100644 --- a/src/calibre/gui2/actions/fts.py +++ b/src/calibre/gui2/actions/fts.py @@ -8,7 +8,7 @@ from calibre.gui2.actions import InterfaceAction class FullTextSearchAction(InterfaceAction): name = 'Full Text Search' - action_spec = (_('Search full text'), 'search.png', + action_spec = (_('Search full text'), 'fts.png', _('Search the full text of all books in the calibre library'), ('Ctrl+/', 'Ctrl+Alt+F')) dont_add_to = frozenset(('context-menu-device',)) action_type = 'current' diff --git a/src/calibre/gui2/fts/dialog.py b/src/calibre/gui2/fts/dialog.py index 0b22ca76ce..d282c3cc2e 100644 --- a/src/calibre/gui2/fts/dialog.py +++ b/src/calibre/gui2/fts/dialog.py @@ -5,7 +5,7 @@ import os from qt.core import ( - QDialogButtonBox, QHBoxLayout, QLabel, QSize, QStackedWidget, QVBoxLayout + QDialogButtonBox, QHBoxLayout, QIcon, QLabel, QSize, QStackedWidget, QVBoxLayout ) from calibre.gui2.fts.scan import ScanStatus @@ -19,6 +19,7 @@ class FTSDialog(Dialog): def __init__(self, parent=None): super().__init__(_('Search the text of all books in the library'), 'library-fts-dialog-2', default_buttons=QDialogButtonBox.StandardButton.Close) + self.setWindowIcon(QIcon.ic('fts.png')) def setup_ui(self): l = QVBoxLayout(self) diff --git a/src/calibre/gui2/layout.py b/src/calibre/gui2/layout.py index d93c370312..e5fba14e8a 100644 --- a/src/calibre/gui2/layout.py +++ b/src/calibre/gui2/layout.py @@ -232,7 +232,7 @@ class SearchBar(QFrame): # {{{ x.setMinimumContentsLength(10) l.addWidget(x) - parent.full_text_search_action = ac = parent.search.add_action('lt.png', QLineEdit.ActionPosition.LeadingPosition) + parent.full_text_search_action = ac = parent.search.add_action('fts.png', QLineEdit.ActionPosition.LeadingPosition) ac.setToolTip('
' + _('Search the full text of all books in the library, not just their metadata')) ac.triggered.connect(self.do_fts)