Skip to content
Permalink
Browse files
Edit Book: Re-implement the saved searches pop-up as a dockable window
  • Loading branch information
kovidgoyal committed Sep 25, 2014
1 parent 92cfab5 commit 18477b56d998a354c21c5f1cb187f27f02aff9fb
Showing with 192 additions and 91 deletions.
  1. +2 −4 src/calibre/gui2/tweak_book/boss.py
  2. +184 −87 src/calibre/gui2/tweak_book/search.py
  3. +6 −0 src/calibre/gui2/tweak_book/ui.py
@@ -837,16 +837,14 @@ def editor_link_clicked(self, url):
error_dialog(self.gui, _('Not found'), _(
'No file with the name %s was found in the book') % target, show=True)

def saved_searches(self):
self.gui.saved_searches.show(), self.gui.saved_searches.raise_()

def save_search(self):
state = self.gui.central.search_panel.state
self.show_saved_searches()
self.gui.saved_searches.add_predefined_search(state)

def show_saved_searches(self):
self.gui.saved_searches.show(), self.gui.saved_searches.raise_()
self.gui.saved_searches_dock.show()
saved_searches = show_saved_searches

def run_saved_searches(self, searches, action):
ed = self.gui.central.current_editor

0 comments on commit 18477b5

Please sign in to comment.