Skip to content

Commit

Permalink
Simplify changing fallback widget to image - #107
Browse files Browse the repository at this point in the history
  • Loading branch information
jurialmunkey committed Nov 24, 2021
1 parent c4b26fe commit 5777e40
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 2 deletions.
1 change: 1 addition & 0 deletions 16x9/Includes_Defs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@
<variable name="Defs_HomeWidget_Content">
<value condition="String.IsEmpty(Container(9000).ListItem.Property(widget)) + !String.IsEmpty(Container(9000).ListItem.Property(background))">-</value>
<value condition="String.IsEqual(Container(9000).ListItem.Property(widget),Weather) + System.HasAddon(resource.images.weatherfanart.multi)">$INFO[Window(Weather).Property(Current.FanartCode),resource://resource.images.weatherfanart.multi/,]/</value>
<value condition="!String.IsEmpty(Skin.String(widget.background.fallback))">-</value>
<value condition="[String.IsEqual(Skin.String(home.fallbackwidget),Weather) | String.IsEqual(Skin.String(home.fallbackwidget.node),Weather)] + System.HasAddon(resource.images.weatherfanart.multi)">$INFO[Window(Weather).Property(Current.FanartCode),resource://resource.images.weatherfanart.multi/,]/</value>
<value condition="!String.IsEmpty(Skin.String(home.fallbackwidget))">$INFO[Skin.String(home.fallbackwidget)]</value>
<value>special://skin/extras/playlists/RandomMovies.xsp</value>
Expand Down
3 changes: 2 additions & 1 deletion 16x9/Includes_Image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,9 @@
<value condition="Window.IsVisible(home) + String.IsEqual(Container(9000).ListItem.Property(background),playlistBackground)">$INFO[Container(9988).ListItem.Art(fanart)]</value>
<value condition="Window.IsVisible(home) + !String.IsEmpty(Container(9000).ListItem.Property(Background))">$INFO[Container(9000).ListItem.Property(Background)]</value>
<value condition="Window.IsVisible(home) + Integer.IsGreater(Container(9000).NumItems,0) + String.IsEqual(Skin.String(home.fallbackwidget.target),pictures) + !String.IsEmpty(Container(9001).ListItem.Icon) + String.IsEmpty(Container(9000).ListItem.Property(widget))">$INFO[Container(9001).ListItem.PicturePath]</value>
<value condition="Window.IsVisible(home) + String.IsEmpty(Skin.String(background.fallback))">special://skin/extras/backgrounds/home.jpg</value>
<value condition="Window.IsVisible(home) + !String.IsEmpty(Skin.String(widget.background.fallback))">$INFO[Skin.String(widget.background.fallback)]</value>
<value condition="Window.IsVisible(home) + !String.IsEmpty(Skin.String(background.fallback))">$INFO[Skin.String(background.fallback)]</value>
<value condition="Window.IsVisible(home) + String.IsEmpty(Skin.String(background.fallback))">special://skin/extras/backgrounds/home.jpg</value>

<value condition="Skin.HasSetting(background.hidefanart) + String.IsEmpty(Skin.String(background.fallback))">common/black.png</value>
<value condition="Skin.HasSetting(background.hidefanart) + !String.IsEmpty(Skin.String(background.fallback))">$INFO[Skin.String(background.fallback)]</value>
Expand Down
1 change: 1 addition & 0 deletions 16x9/Includes_Label.xml
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@

<!-- Skin Settings VARS -->
<variable name="Label_SkinSetting_FallbackWidget">
<value condition="!String.IsEmpty(Skin.String(widget.background.fallback))">$LOCALIZE[31283]</value>
<value condition="!String.IsEmpty(Skin.String(home.fallbackwidget.name))">$INFO[Skin.String(home.fallbackwidget.name)]</value>
<value>$LOCALIZE[31180]</value>
</variable>
Expand Down
13 changes: 13 additions & 0 deletions 16x9/SkinSettings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,25 @@
<width>100%</width>
<label>31147</label>
<label2>$VAR[Label_SkinSetting_FallbackWidget]</label2>
<onclick condition="!String.IsEmpty(Skin.String(widget.background.fallback))">Skin.Reset(widget.background.fallback)</onclick>
<onclick>SetProperty(home.fallbackwidget.name,$INFO[Skin.String(home.fallbackwidget.name)],home)</onclick>
<onclick>RunScript(script.skinshortcuts,type=widgets&amp;grouping=widget&amp;skinWidgetPath=home.fallbackwidget&amp;skinWidget=home.fallbackwidget.node&amp;skinWidgetName=home.fallbackwidget.name&amp;skinWidgetType=home.fallbackwidget.type&amp;skinWidgetTarget=home.fallbackwidget.target)</onclick>
<height>72</height>
<include>Defs_OptionButton</include>
<visible>ControlGroup(8000).HasFocus(8001)</visible>
</control>

<!-- Replace Fallback with Image -->
<control type="button" id="8143">
<width>100%</width>
<label>$LOCALIZE[31282]</label>
<label2>$INFO[Skin.String(widget.background.fallback)]</label2>
<onclick condition="String.IsEmpty(Skin.String(widget.background.fallback))">Skin.SetImage(widget.background.fallback)</onclick>
<onclick condition="!String.IsEmpty(Skin.String(widget.background.fallback))">Skin.Reset(widget.background.fallback)</onclick>
<height>72</height>
<include>Defs_OptionButton</include>
<visible>ControlGroup(8000).HasFocus(8001)</visible>
</control>

<!-- Widget Info Box -->
<control type="radiobutton" id="8105">
Expand Down
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<addon id="skin.eminence.2" name="Eminence" provider-name="jurialmunkey" version="4.1.19">
<addon id="skin.eminence.2" name="Eminence" provider-name="jurialmunkey" version="4.1.20">
<requires>
<import addon="xbmc.gui" version="5.15.0" />
<import addon="script.skinshortcuts" version="1.0.0" />
Expand Down
10 changes: 10 additions & 0 deletions language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -1210,3 +1210,13 @@ msgstr ""
msgctxt "#31281"
msgid "Show media flags with controls"
msgstr ""

#: /16x9/SkinSettings.xml
msgctxt "#31282"
msgid "Replace fallback widget with image"
msgstr ""

#: /16x9/Includes_Label.xml
msgctxt "#31283"
msgid "Fallback image"
msgstr ""

0 comments on commit 5777e40

Please sign in to comment.