2013-12-05, 01:38
(2013-12-05, 00:09)BigNoid Wrote: Works a treat, thx.
If anyone wants to test, make a shortcuts folder in your skin directory, put a file the with extension .db and fill it with syntax like this:
Code:[['Put your label1 here', 'Put your Label2 here', 'Put your Icon here', 'Put your Thumbnail image here', 'ActivateWindow(Weather)'],
[xbmc.getLocalizedString(31951), 'Label2', 'special://skin/backgrounds/pictures/default.jpg', xbmc.getInfoLabel('Skin.String(CustomPicturesBg)'), 'ActivateWindow(Pictures)']]
Been thinking about this example some more, and realised that this wouldn't work if the user switched to another skin using skinshortcuts as it uses a string specific to the current skin - the shortcut would still load, but it would be labelled whatever that skin has assigned to the string 31951 (or possibly, wouldn't have a label at all).
A quick fix would be to use one of the strings supplied by XBMC (and therefore available to all skins) - if the label is meant to be 'Pictures', for example, then (and I haven't tested this) it could use xbmc.getLocalizedString(1). However, if it's providing something which only works with the current skin, I need to think of a way for skins to provide shortcuts which won't carry over to other skins.