Add System.AddonIsEnabled() / EnableAddon()

This commit is contained in:
Christian Gade 2020-07-21 23:45:19 +02:00
parent 359435096f
commit 59db88446b
6 changed files with 14 additions and 17 deletions

View File

@ -525,7 +525,7 @@
<height>35</height> <height>35</height>
<colordiffuse>CCFFFFFF</colordiffuse> <colordiffuse>CCFFFFFF</colordiffuse>
<texture flipy="true" border="0,5,0,0" flipx="true">HomeSubEnd.png</texture> <texture flipy="true" border="0,5,0,0" flipx="true">HomeSubEnd.png</texture>
<animation effect="slide" start="0,0" end="145,0" time="0" condition="!System.HasAddon(script.globalsearch)">Conditional</animation> <animation effect="slide" start="0,0" end="145,0" time="0" condition="!System.AddonIsEnabled(script.globalsearch)">Conditional</animation>
</control> </control>
<control type="radiobutton" id="608"> <control type="radiobutton" id="608">
<colordiffuse>CCFFFFFF</colordiffuse> <colordiffuse>CCFFFFFF</colordiffuse>
@ -545,7 +545,9 @@
<texturenofocus flipy="true" border="5">HomeSubNF.png</texturenofocus> <texturenofocus flipy="true" border="5">HomeSubNF.png</texturenofocus>
<pulseonselect>false</pulseonselect> <pulseonselect>false</pulseonselect>
<label>137</label> <label>137</label>
<onclick>RunScript(script.globalsearch)</onclick> <onclick condition="System.AddonIsEnabled(script.globalsearch)">RunScript(script.globalsearch)</onclick>
<onclick condition="!System.AddonIsEnabled(script.globalsearch) + System.HasAddon(script.globalsearch)">EnableAddon(script.globalsearch)</onclick>
<onclick condition="!System.HasAddon(script.globalsearch)">InstallAddon(script.globalsearch)</onclick>
<textureradioonfocus>icon_search_home.png</textureradioonfocus> <textureradioonfocus>icon_search_home.png</textureradioonfocus>
<textureradioonnofocus>icon_search_home.png</textureradioonnofocus> <textureradioonnofocus>icon_search_home.png</textureradioonnofocus>
<textureradioofffocus>icon_search_home.png</textureradioofffocus> <textureradioofffocus>icon_search_home.png</textureradioofffocus>
@ -554,7 +556,6 @@
<onright>601</onright> <onright>601</onright>
<onup>9003</onup> <onup>9003</onup>
<ondown>9000</ondown> <ondown>9000</ondown>
<visible>System.HasAddon(script.globalsearch)</visible>
</control> </control>
<control type="group" id="600"> <control type="group" id="600">
<left>180</left> <left>180</left>
@ -907,8 +908,7 @@
<height>60</height> <height>60</height>
<onleft>9000</onleft> <onleft>9000</onleft>
<onright>9000</onright> <onright>9000</onright>
<onup condition="System.HasAddon(script.globalsearch)">608</onup> <onup>608</onup>
<onup condition="!System.HasAddon(script.globalsearch)">603</onup>
<ondown>9001</ondown> <ondown>9001</ondown>
<pagecontrol/> <pagecontrol/>
<scrolltime>300</scrolltime> <scrolltime>300</scrolltime>

View File

@ -202,13 +202,13 @@
<include>ButtonHomeSubCommonValues</include> <include>ButtonHomeSubCommonValues</include>
<label>LibreELEC</label> <label>LibreELEC</label>
<onclick>RunAddon(service.libreelec.settings)</onclick> <onclick>RunAddon(service.libreelec.settings)</onclick>
<visible>System.HasAddon(service.libreelec.settings)</visible> <visible>System.AddonIsEnabled(service.libreelec.settings)</visible>
</control> </control>
<control type="button" id="90400"> <control type="button" id="90400">
<include>ButtonHomeSubCommonValues</include> <include>ButtonHomeSubCommonValues</include>
<label>CoreELEC</label> <label>CoreELEC</label>
<onclick>RunAddon(service.coreelec.settings)</onclick> <onclick>RunAddon(service.coreelec.settings)</onclick>
<visible>System.HasAddon(service.coreelec.settings)</visible> <visible>System.AddonIsEnabled(service.coreelec.settings)</visible>
</control> </control>
<control type="button" id="90123"> <control type="button" id="90123">
<include>ButtonHomeSubCommonValues</include> <include>ButtonHomeSubCommonValues</include>

View File

@ -4,8 +4,7 @@
<control type="group" id="9003"> <control type="group" id="9003">
<depth>DepthMenu</depth> <depth>DepthMenu</depth>
<onup>20</onup> <onup>20</onup>
<ondown condition="System.HasAddon(script.globalsearch)">608</ondown> <ondown>608</ondown>
<ondown condition="!System.HasAddon(script.globalsearch)">603</ondown>
<visible>!Window.IsVisible(Favourites)</visible> <visible>!Window.IsVisible(Favourites)</visible>
<include>VisibleFadeEffect</include> <include>VisibleFadeEffect</include>
<animation effect="fade" time="225" delay="750">WindowOpen</animation> <animation effect="fade" time="225" delay="750">WindowOpen</animation>
@ -41,8 +40,7 @@
<onleft>8000</onleft> <onleft>8000</onleft>
<onright>8000</onright> <onright>8000</onright>
<onup>20</onup> <onup>20</onup>
<ondown condition="System.HasAddon(script.globalsearch)">608</ondown> <ondown>608</ondown>
<ondown condition="!System.HasAddon(script.globalsearch)">603</ondown>
<viewtype label="535">list</viewtype> <viewtype label="535">list</viewtype>
<pagecontrol/> <pagecontrol/>
<scrolltime>200</scrolltime> <scrolltime>200</scrolltime>
@ -277,8 +275,7 @@
<onleft>8001</onleft> <onleft>8001</onleft>
<onright>8001</onright> <onright>8001</onright>
<onup>20</onup> <onup>20</onup>
<ondown condition="System.HasAddon(script.globalsearch)">608</ondown> <ondown>608</ondown>
<ondown condition="!System.HasAddon(script.globalsearch)">603</ondown>
<viewtype label="535">list</viewtype> <viewtype label="535">list</viewtype>
<pagecontrol/> <pagecontrol/>
<scrolltime>200</scrolltime> <scrolltime>200</scrolltime>
@ -539,8 +536,7 @@
<onleft>8002</onleft> <onleft>8002</onleft>
<onright>8002</onright> <onright>8002</onright>
<onup>20</onup> <onup>20</onup>
<ondown condition="System.HasAddon(script.globalsearch)">608</ondown> <ondown>608</ondown>
<ondown condition="!System.HasAddon(script.globalsearch)">603</ondown>
<viewtype label="535">list</viewtype> <viewtype label="535">list</viewtype>
<pagecontrol/> <pagecontrol/>
<scrolltime>200</scrolltime> <scrolltime>200</scrolltime>

View File

@ -14,7 +14,7 @@
<randomize>true</randomize> <randomize>true</randomize>
<fadetime>1000</fadetime> <fadetime>1000</fadetime>
<include>VisibleFadeEffect</include> <include>VisibleFadeEffect</include>
<visible>System.HasAddon(resource.images.weatherfanart.multi)</visible> <visible>System.AddonIsEnabled(resource.images.weatherfanart.multi)</visible>
<animation effect="fade" time="150">WindowClose</animation> <animation effect="fade" time="150">WindowClose</animation>
</control> </control>
<include content="CommonWindowHeader"> <include content="CommonWindowHeader">

View File

@ -143,6 +143,6 @@
<screenshot>resources/screenshot-08.jpg</screenshot> <screenshot>resources/screenshot-08.jpg</screenshot>
<screenshot>resources/screenshot-09.jpg</screenshot> <screenshot>resources/screenshot-09.jpg</screenshot>
</assets> </assets>
<news>- Bump xbmc.gui.</news> <news>- Bump xbmc.gui.[CR]- Add support for enabled add-ons.</news>
</extension> </extension>
</addon> </addon>

View File

@ -1,6 +1,7 @@
[B]4.7.5[/B] [B]4.7.5[/B]
- Bump xbmc.gui - Bump xbmc.gui
- Add support for enabled add-ons
[B]4.7.1[/B] [B]4.7.1[/B]