WindowXML and supplying skin files, detecting current skin
#1
I have made a fair attempt at a skinnable, localisable plugin - XSqueeze.

It uses a WindowXML - and loads the fallback skin file from Default/720p etc.

As far as I can tell, if users of non-Confluence want to skin this, then the skin maker has to create a particular file (XSqueezeNowPlaying.xml) and supply that with their skin.

It seems to me a better way would for this to be included with the add on (meaning it's easier for non skin writers to supply me with one they have knocked up) and for the addon to detect their current skin (how) and create the appriopriate WindowXML directly.

Is this a good approach? It seems less likely that skinners will find, get motivated, and make the appropriate xml than users of the plugin ...and then they would quickly benefit all users of the particular plugin+skin combination.

Your thoughts appreciated (especially if I have misunderstood how this is supposed to work!!)
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#2
If you supply a default skin( addon_folder/resources/skins/Default/) this will be used if the skin developer does not include their own version of the XML(which would match their skin style)

There has been talk about allowing addons to have a little more control(our own fonts, includes, etc) so the addon skin looks the same on all skins, though this will not happen until the next release after Eden.
Reply
#3
Yep I've got that going on, and at the moment use a labelenum in my settings where the user can choose a skin file so I can deliver it with add on instead of dealing with the skinmakers (which would be fine too but especially when an addon is new, it seems unreasonable to chase them all down and ask them to include it, and it may change a bit as more info is made available to the skin etc).

My point is it would be far better for the addon to supply the skin files that the skin, in a way - means the add on maker could tweak the skin files if required and they probably know best.

But maybe there's disadvantages I can't think of at the mo', and obviously this is definitely a post Eden thing...if there ever IS a post-Eden Wink
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#4
bossanova808 Wrote:Yep I've got that going on, and at the moment use a labelenum in my settings where the user can choose a skin file so I can deliver it with add on instead of dealing with the skinmakers (which would be fine too but especially when an addon is new, it seems unreasonable to chase them all down and ask them to include it, and it may change a bit as more info is made available to the skin etc).

My point is it would be far better for the addon to supply the skin files that the skin, in a way - means the add on maker could tweak the skin files if required and they probably know best.

But maybe there's disadvantages I can't think of at the mo', and obviously this is definitely a post Eden thing...if there ever IS a post-Eden Wink

To get the skin being used, you can parse the guisettings.xml file in the userdata folder and look for the lookandfeel section.
Code:
<lookandfeel>
        <enablerssfeeds>true</enablerssfeeds>
        <font>Default</font>
        <rssedit></rssedit>
        <skin>skin.transparency.svn</skin>
        <skincolors>SKINDEFAULT</skincolors>
        <skintheme>SKINDEFAULT</skintheme>
        <skinzoom>0</skinzoom>
        <soundskin>SKINDEFAULT</soundskin>
        <startupwindow>10000</startupwindow>
    </lookandfeel>

Though chasing after the skin developers would be trouble some, so would be to make a skin for 20+ skins(I have a tough enough time with my one skin for cdART Manager.. Smile )
Reply
#5
Good point, but it's not so much that I plan to make them, more so collect and distribute them should users contribute them...

You'd think there might be a getSetting type thing for the current skin - parsing the xml - sheesh! Wink
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#6
Um, can't you provide multiple versions of the skin to match the various ones yourself already?

addon_folder/resources/skins/Confluence/
addon_folder/resources/skins/Transparency/

etc.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#7
I am pretty sure not - in the constructor you specify where the xml file is, or at least the stem, as in:

Code:
window = NowPlayingWindow("XSqueezeNowPlaying.xml",constants.__cwd__,"Default")
...that Default can be anything you like, but I don't think you can create a bunch of xmls and it finds them via the skin name...hasn't worked in my basic testing anyway
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#8
bossanova808 Wrote:I am pretty sure not - in the constructor you specify where the xml file is, or at least the stem, as in:

Code:
window = NowPlayingWindow("XSqueezeNowPlaying.xml",constants.__cwd__,"Default")
...that Default can be anything you like, but I don't think you can create a bunch of xmls and it finds them via the skin name...hasn't worked in my basic testing anyway

See how PseudoTV does this.
It has several xml files included for different skins "addon/resources/skin/xxx/" except the one for Aeon Nox that is provided by the skin itself and is taken from "skin.aeon.nox/720p/"
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#9
ok will do - I was trying with an Aeon Nox file actually.
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#10
ok yep it works...

Code:
\addons\script.xsqueeze\resources\skins\skin.aeon.nox\720p\XSqueezeNowPlaying.xml

is all that is needed for it to be picked up.

Sweet! & thanks!
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#11
bossanova808 Wrote:ok yep it works...

Code:
\addons\script.xsqueeze\resources\skins\skin.aeon.nox\720p\XSqueezeNowPlaying.xml

is all that is needed for it to be picked up.

Sweet! & thanks!

You can also code it like that when it is supplied by the skin itself it will take that one. If missing search your add-on folder and if still missing take default
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply

Logout Mark Read Team Forum Stats Members Help
WindowXML and supplying skin files, detecting current skin0