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.
|