09-15-2023, 04:38 AM | #226 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
And FWIW: if I remove 'images' as in Code:
icon = get_icons('icon.png', 'Interface Plugin Demo') |
|
09-15-2023, 04:47 AM | #227 |
creator of calibre
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
09-15-2023, 04:52 AM | #228 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
09-15-2023, 05:27 AM | #229 |
Groupie
Posts: 161
Karma: 1842
Join Date: Jan 2016
Device: Kobo Glo HD
|
Thanks everyone
Just to be sure, in the past I always put the icons in 'resources\images\PluginName'. Should I put the icons in 'resources\images\PluginName\images' or in 'resources\images\PluginName'? |
09-15-2023, 06:06 AM | #230 |
creator of calibre
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
09-15-2023, 06:18 AM | #231 |
Groupie
Posts: 161
Karma: 1842
Join Date: Jan 2016
Device: Kobo Glo HD
|
|
09-15-2023, 07:42 AM | #232 | |
Guru
Posts: 928
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Quote:
Now that @chaley mentioned, I remember the reason I decided not to use get_icons() directly: the 'images' sub-folder. Two questions: 1) My plugin zip file contains two sets of icons, so it works for both themes out of the box. Would it be possible for calibre to look for the variants inside the zip file too? 2) Sometimes, I use calibre general icons (like 'marked.png'). The problem is get_icons() do not look for those. Would it be possible to include general icons? |
|
09-15-2023, 10:09 AM | #233 |
creator of calibre
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If you are using a calibre icon just use it directly, there is no reason to call get_icons(). Why would you want to do that?
|
09-15-2023, 10:10 AM | #234 |
Plugin Developer
Posts: 6,328
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
|
Thanks, Kovid. New version works for me.
FYI, my plugins' get_icon() looks first for eg 'icon.png' then automatically 'images/icon.png' to cover both cases. And I use it for calibre icons all the time without issue. |
09-15-2023, 10:33 AM | #235 |
Guru
Posts: 928
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Sure, my version works too. I'm tlaking about calibre get_icons(). It doesn't get calibre icons.
|
09-15-2023, 10:35 AM | #236 |
Guru
Posts: 928
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
|
09-15-2023, 10:35 AM | #237 |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
09-15-2023, 10:37 AM | #238 |
Guru
Posts: 928
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Suggestion for PI Devs | BetterRed | Plugins | 11 | 09-27-2020 06:18 PM |
Attn plugin devs: porting to python 3 | kovidgoyal | Plugins | 129 | 06-16-2020 01:31 AM |
Attention All Plugin Devs: Remove vestiges from python 2? | KevinH | Plugins | 11 | 05-29-2020 03:16 PM |
Plugin Devs: Should we include a License or COPYING file? | KevinH | Plugins | 3 | 08-15-2017 01:09 PM |
New Plugin Features in the upcoming Sigil 0.8.900 | KevinH | Plugins | 6 | 09-14-2015 02:48 PM |