Hi Guys,
Have just found a little gotcha with disabled addons in Krypton (and pretty sure would be a problem under Leia). I use the following code to allow the user to install optional addons from my skins settings menus:
Now if the addon is NOT installed it would display the Alt label and prompt user if it is OK to install the addon on a onclick. But if addon is installed but disabled, the visible condition
Probably the easiest way to resolve that issue is for the InstallAddon function to check if addon is installed but disabled and to just enable the addon. The other issue(s) as far as skinners would be concerned is that there is no skin boolean to show if an addon is disabled (and so changed the text in the above example code) and no skin function to enable the addon.
As things stand at the moment, the user can end up in a situation where they can't enable a function from within the skin (well they can, but only if they realise that the required addon has been disabled and know how to resolve the issue). As far as I can see the only way to resolve this situation from a skin writers point of view would be to make all of the addons dependency requirements in the addon.xml file. And we all know where that will end up...
So does anyone have any thoughts on this?
Wyrm (AppTV)
Have just found a little gotcha with disabled addons in Krypton (and pretty sure would be a problem under Leia). I use the following code to allow the user to install optional addons from my skins settings menus:
Code:
<control type="group" id="702">
<height>84</height>
<width>1328</width>
<control type="togglebutton" id="703">
<!-- Artist slideshow script install/config -->
<onup>718</onup>
<ondown>707</ondown>
<onright>999</onright>
<include>settings-submenu-common</include>
<textwidth>1178</textwidth>
<label>$LOCALIZE[24020]</label>
<altlabel>$LOCALIZE[24038]</altlabel>
<align>right</align>
<onclick>Addon.OpenSettings(script.artistslideshow)</onclick>
<altclick>InstallAddon(script.artistslideshow)</altclick>
<usealttexture>!System.HasAddon(script.artistslideshow)</usealttexture>
</control>
<control type="label">
<include>settings-submenu-common</include>
<label>$LOCALIZE[31590]</label>
<textoffsetx>27</textoffsetx>
</control>
</control>
Now if the addon is NOT installed it would display the Alt label and prompt user if it is OK to install the addon on a onclick. But if addon is installed but disabled, the visible condition
Quote:!System.HasAddon(script.artistslideshow)still shows as true and so in the example code above, line below still runs but with no result.
Quote:InstallAddon(script.artistslideshow)
Probably the easiest way to resolve that issue is for the InstallAddon function to check if addon is installed but disabled and to just enable the addon. The other issue(s) as far as skinners would be concerned is that there is no skin boolean to show if an addon is disabled (and so changed the text in the above example code) and no skin function to enable the addon.
As things stand at the moment, the user can end up in a situation where they can't enable a function from within the skin (well they can, but only if they realise that the required addon has been disabled and know how to resolve the issue). As far as I can see the only way to resolve this situation from a skin writers point of view would be to make all of the addons dependency requirements in the addon.xml file. And we all know where that will end up...
So does anyone have any thoughts on this?
Wyrm (AppTV)