mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Add a button to launch FTS to the search bar
This commit is contained in:
parent
2ea40e6cef
commit
b51e85e98e
@ -232,6 +232,10 @@ class SearchBar(QFrame): # {{{
|
||||
x.setMinimumContentsLength(10)
|
||||
l.addWidget(x)
|
||||
|
||||
parent.full_text_search_action = ac = parent.search.add_action('lt.png', QLineEdit.ActionPosition.LeadingPosition)
|
||||
ac.setToolTip('<p>' + _('Search the full text of all books in the library, not just their metadata'))
|
||||
ac.triggered.connect(self.do_fts)
|
||||
|
||||
parent.advanced_search_toggle_action = ac = parent.search.add_action('gear.png', QLineEdit.ActionPosition.LeadingPosition)
|
||||
parent.addAction(ac)
|
||||
ac.setToolTip(_('Advanced search'))
|
||||
@ -300,6 +304,10 @@ class SearchBar(QFrame): # {{{
|
||||
from calibre.gui2.ui import get_gui
|
||||
get_gui().iactions['Sort By'].update_menu(self.sort_button.menu())
|
||||
|
||||
def do_fts(self):
|
||||
from calibre.gui2.ui import get_gui
|
||||
get_gui().iactions['Full Text Search'].show_fts()
|
||||
|
||||
# }}}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user