View Single Post
Old 06-13-2011, 08:40 AM   #3
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,726
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Perhaps I didn't explain very well. All I want to do is get a value to pass to search_getting_ids for it's second parameter of "restriction", which represents whatever the current restriction is that the user has applied in Calibre. As I said above I cannot use self.gui.search.search_restiction, because I will get a value of a saved search name in some cases, and actual text representing the restriction in others, depending on whether the user last applied a current search or a named restriction.

To get around this I can go down the FindDuplicates route of looking at the text in the combo, seeing if it starts with a * or not and then manipulating that into a value search_getting_ids can cope with. However that is something I would need to repeatedly do everywhere I call search_getting_ids(). I wondered if there was somewhere else that would give me the "underlying" value without requiring me to manipulate it.
kiwidude is offline   Reply With Quote