View Single Post
Old 12-31-2010, 07:43 AM   #155
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Walk Search History plugin

*** This plugin has now been moved to it's own thread - download from the link below ***
http://www.mobileread.com/forums/sho...d.php?t=118772

This plugin provides toolbar and keyboard shortcuts to moving forward and backward through your Calibre search dropdown history. By default Alt+Left arrow key will move back one search in your history, and Alt+Right arrow key will move forward one search. When added to your toolbar the default button action is to go back one search, and the dropdown allows you to move forward. You can repeatedly go back and forward through your search history without altering it's order in any way - which differs from selecting items in the search dropdown directly.

The intention is to offer a similar experience to a web browser of allowing you to "surf" back and forth between your search results. Also upon restarting Calibre you can quickly restore your last search by hitting Alt+Left. Another example usage is when you get "sidetracked" and want to run a query on another book/series/author and then most quickly return to your previous search results.

Special Notes
  • Requires Calibre 0.7.35 or later. Relies on a Calibre search bug-fix as per ticket #8018
  • As Calibre never represents "no search text" in your history, you cannot go back or forward to a "cleared" search, only to items listed in the search history dropdown. This is by design.
Installation Notes
  1. Follow steps as per first post in this thread
  2. If you wish to customise the keyboard shortcuts from their default, you can do so within the preferences dialog in the same screen you add the plugin. Expand the "User Interface Action plugins" section and select the "Walk Search History" plugin on this list. Click the "Customise plugin" button and type the text for your alternate shortcut key combinations.
Any feedback/suggestions welcomed. This plugin includes my first attempt at a custom UI for plugin preferences with persistence to a JSON file. It should hopefully prove useful to myself and others looking to implement similar UI features to plugins as ready-made examples of this are a bit thin on the ground at present.
Attached Thumbnails
Click image for larger version

Name:	ToolbarScreenshot.png
Views:	132
Size:	19.5 KB
ID:	63829   Click image for larger version

Name:	CustomiseScreenshot.png
Views:	147
Size:	142.0 KB
ID:	63830  

Last edited by kiwidude; 01-27-2011 at 09:18 PM. Reason: Moved to own thread
kiwidude is offline