![]() |
#226 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,313
Karma: 7957679
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') |
|
![]() |
![]() |
![]() |
#227 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,144
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
Advert | |
|
![]() |
#228 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,313
Karma: 7957679
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#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'? |
![]() |
![]() |
![]() |
#230 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,144
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
Advert | |
|
![]() |
#231 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 161
Karma: 1842
Join Date: Jan 2016
Device: Kobo Glo HD
|
|
![]() |
![]() |
![]() |
#232 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,182
Karma: 1306007
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? |
|
![]() |
![]() |
![]() |
#233 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,144
Karma: 27110894
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?
|
![]() |
![]() |
![]() |
#234 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,812
Karma: 4604429
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. |
![]() |
![]() |
![]() |
#235 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,182
Karma: 1306007
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.
|
![]() |
![]() |
![]() |
#236 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,182
Karma: 1306007
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
|
![]() |
![]() |
![]() |
#237 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,313
Karma: 7957679
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
![]() |
![]() |
![]() |
#238 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,182
Karma: 1306007
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |