View Single Post
Old 04-10-2011, 05:59 PM   #1
kiwidude
Calibre Plugins 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,731
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Specifying a default search when switching libraries from a plugin

In the "View Manager" plugin a user requested the ability for the plugin to apply the "last used view" when Calibre starts up/switches libraries. Applying columns (which Calibre does anyway) and sort orders (which Calibre doesn't) works fine.

However in the plugin (in my initialization_complete) if I call self.gui.apply_named_search_restriction or self.gui.saved_search.saved_search_selected to either apply a restriction or apply a saved search, these appear to be cleared by code later in the startup/library switch process.

Is there some signal perhaps that I could connect to from my plugin to know when the Calibre gui is initialized to a point where it would allow me to apply search restrictions or searches? Both at startup and when libraries are switched?

Last edited by kiwidude; 04-10-2011 at 06:59 PM. Reason: Changed thread title
kiwidude is offline   Reply With Quote