View Single Post
Old 07-28-2022, 07:34 AM   #901
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,203
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by tamaracks View Post
Another question: Is there a way to disable an Action Chains menu item if no book is selected? I thought maybe I could test a basic template tag like title for a value, but it seems like the template functions are hanging on to the most recently selected book, even if nothing is selected in the current view. For instance, I have an chain that calls up the metadata view for a book via Calibre Actions. Sometimes I do something beforehand that unselects the books in the view, but I forget and when I run this chain, I get an error about nothing being selected. Just hoping to avoid that.
You can set the following condition on the chain:

Code:
template = program: selection_count()
datatype = number
comparison = ">"
condition value = 0
Note, however, that this can lead to a lag when clicking the Action Chains menu while having a lot of items selected (hundreds of books), because the condition will take some time to be processed.

Quote:
Originally Posted by tamaracks View Post
Makes sense. Is there a way for me to pull a copy of the icons from Calibre to load as custom?
Try the chain attached. It should extract the icons to a folder called calibre-default-icons inside your home directory.

To import the zip file, open the chains dialog > right click > import chain > select zip file.
Attached Files
File Type: zip extract_default_icons.zip (637 Bytes, 141 views)

Last edited by capink; 07-28-2022 at 07:38 AM.
capink is offline   Reply With Quote