Specify a windowxml file in skin
#1
My addon utilizes a custom window , which just brings up a 'more info' type page that users interact with.

Some skinners have requested the ability to change this window so it matches their skin, but I'm having trouble figuring out how to do this, if this is even possible.

My general thought was in my addon have code that searches to see if a skinner has put a specific named xml file into their skins folder.  If the file exists, then use that one, if it doesn't then use the default.
python:

If path_to_addons/skin.xyz/720p/IARL.xml exists:
    use IARL.xml in skin folder
else:
    use IARLs default.xml in addon folder

The code works, except for the part where I try and call the IARL.xml file in the skins directory.  In testing I find that the xbmcgui.WindowXMLDialog class doesn't let me point to 'path_to_addons/skin.xyz/720p/IARL.xml', it always appends 'resources/skins/Default/' into the path.

Is what I'm attempting to do possible?  Any help would be greatly appreciated.
Reply
#2
I think it's as easy as simply prefixing all your skin files with
code:
script-
then all skinners need do is use the same naming convention and Kodi will do the rest.
Reply
#3
you don't need to do anything really, it works out of the box.
kodi will first look for a window in the skin, if it can't find one, it uses the one provided by the addon.

it's recommended to prefix your files with a unique id, so they can't clash with skin files from another addon.
so common practice is to use this format script-myaddon-somewindow.xml.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#4
Thanks for the info.  I finally got it working, and I think it was just me not understanding the class and what it was looking for.

Cheers!
Reply

Logout Mark Read Team Forum Stats Members Help
Specify a windowxml file in skin0