From 5714c9e9a11ac3a8ac21cd81c5bd491e242b24f2 Mon Sep 17 00:00:00 2001 From: jurialmunkey Date: Wed, 20 Mar 2019 00:09:21 +1100 Subject: [PATCH] 0.9.10 - rewrite multiwidget code --- 1080i/Home.xml | 20 +++- 1080i/Includes_Home.xml | 27 +++++- 1080i/Includes_Labels.xml | 4 +- 1080i/SkinSettings.xml | 2 +- 1080i/script-skinshortcuts.xml | 88 +++++++++++++---- addon.xml | 2 +- changelog.txt | 3 + language/resource.language.en_gb/strings.po | 15 +++ shortcuts/overrides.xml | 13 ++- shortcuts/template.xml | 102 +++----------------- 10 files changed, 155 insertions(+), 121 deletions(-) diff --git a/1080i/Home.xml b/1080i/Home.xml index 7b47942e..d49f4b16 100644 --- a/1080i/Home.xml +++ b/1080i/Home.xml @@ -17,13 +17,31 @@ SetFocus(301) SetFocus(301) - RunScript(script.skinshortcuts,type=buildxml&mainmenuID=301&mode=single&group=mainmenu|powermenu) + RunScript(script.skinshortcuts,type=buildxml&mainmenuID=301&levels=1&group=mainmenu|powermenu) AlarmClock(SkinSplashStarted,SetProperty(SkinSplashStarted,1,home),00:01,silent,false) ClearProperty(SkinHelper.WidgetContainer) + + hidden container for widget count + -20 + -20 + 1 + 1 + true + 50 + 50 + 50 + 50 + true + + + + + skinshortcuts-submenu-1 + hidden container for playlist background -20 diff --git a/1080i/Includes_Home.xml b/1080i/Includes_Home.xml index ba41e3e7..f715db74 100644 --- a/1080i/Includes_Home.xml +++ b/1080i/Includes_Home.xml @@ -860,8 +860,8 @@ -52 true 0 - skinshortcuts-template-vertical-main skinshortcuts-template-vertical-submenu + skinshortcuts-template-vertical-main Integer.IsEqual(Container(3000).NumItems,1) @@ -880,8 +880,20 @@ 1500 !ControlGroup(3000).HasFocus() + !Control.IsVisible(993100) skinshortcuts-template-vertical-info + + 1500 + !ControlGroup(3000).HasFocus() + Control.IsVisible(993100) + + + + + + + @@ -949,8 +961,8 @@ -52 true 0 - skinshortcuts-template-vertical-main skinshortcuts-template-vertical-submenu + skinshortcuts-template-vertical-main Integer.IsEqual(Container(3000).NumItems,1) @@ -968,8 +980,19 @@ !ControlGroup(3000).HasFocus() + !Control.IsVisible(993100) skinshortcuts-template-vertical-info + + !ControlGroup(3000).HasFocus() + Control.IsVisible(993100) + + + + + + + diff --git a/1080i/Includes_Labels.xml b/1080i/Includes_Labels.xml index 159d9402..c0baf6e0 100644 --- a/1080i/Includes_Labels.xml +++ b/1080i/Includes_Labels.xml @@ -18,8 +18,8 @@ - $LOCALIZE[31010] - $LOCALIZE[31038] + $LOCALIZE[31011] + $LOCALIZE[31038] - $LOCALIZE[31011] diff --git a/1080i/SkinSettings.xml b/1080i/SkinSettings.xml index fdcc84b9..0a8e928b 100644 --- a/1080i/SkinSettings.xml +++ b/1080i/SkinSettings.xml @@ -1,7 +1,7 @@ 300 Defs_Settings_OnLoad - RunScript(script.skinshortcuts,type=buildxml&mainmenuID=301&mode=single&group=mainmenu|powermenu) + RunScript(script.skinshortcuts,type=buildxml&mainmenuID=301&levels=1&group=mainmenu|powermenu) SetProperty(NINE_manual_set,"var=main,set=$INFO[Skin.String(colorbox_main)]|var=comp,set=$INFO[Skin.String(colorbox_comp)]|var=quality,set=$INFO[Skin.String(colorbox_quality)]|var=blursize,set=$INFO[Skin.String(colorbox_blursize)]|var=bitsize,set=$INFO[Skin.String(colorbox_bitsize)]|var=pixelsize,set=$INFO[Skin.String(colorbox_pixelsize)]|var=black,set=$INFO[Skin.String(colorbox_black)]|var=white,set=$INFO[Skin.String(colorbox_white)]|var=blend,set=$INFO[Skin.String(colorbox_blend)]|var=desat,set=$INFO[Skin.String(colorbox_desat)]",home) SetProperty(CurrentFocus,$NUMBER[9001]) diff --git a/1080i/script-skinshortcuts.xml b/1080i/script-skinshortcuts.xml index 47e6e66c..1dc7e41a 100644 --- a/1080i/script-skinshortcuts.xml +++ b/1080i/script-skinshortcuts.xml @@ -19,17 +19,18 @@ font_small_bold left dialog_fg_70 + !String.EndsWith(Window.Property(groupname),.1) - - + - Widgets - 580 + header label + 30 90 - font_small_bold left dialog_fg_70 + + String.EndsWith(Window.Property(groupname),.1) @@ -170,6 +171,41 @@ !String.IsEqual(Container(211).ListItem.Property(skinshortcuts-disabled),True) Dialog_Standard_Button + !String.EndsWith(Window.Property(groupname),.1) + + + + !String.IsEqual(Container(211).ListItem.Property(skinshortcuts-disabled),True) + + SetProperty(custom-grouping,widget) + SendClick(401) + Dialog_Standard_Button + String.EndsWith(Window.Property(groupname),.1) + + SetProperty(customProperty,widgetTarget) + SetProperty(customValue,music) + SendClick(404) + + SetProperty(customProperty,widgetTarget) + SetProperty(customValue,pictures) + SendClick(404) + + SetProperty(customProperty,widgetTarget) + SetProperty(customValue,videos) + SendClick(404) + + + SetProperty(customProperty,widgetTarget) + SetProperty(customValue,music) + SendClick(404) + + SetProperty(customProperty,widgetTarget) + SetProperty(customValue,pictures) + SendClick(404) + + SetProperty(customProperty,widgetTarget) + SetProperty(customValue,videos) + SendClick(404) @@ -177,6 +213,7 @@ $INFO[Container(211).ListItem.Property(Path)] !String.IsEqual(Container(211).ListItem.Property(skinshortcuts-disabled),True) Dialog_Standard_Button + !String.EndsWith(Window.Property(groupname),.1) @@ -190,6 +227,7 @@ SendClick(404) Skin.Reset(1134_Node) Dialog_Standard_Button + !String.EndsWith(Window.Property(groupname),.1) @@ -204,6 +242,16 @@ !String.IsEqual(Container(211).ListItem.Property(skinshortcuts-disabled),True) Dialog_Standard_Button !String.IsEqual(Window.Property(groupname),powermenu) + !String.EndsWith(Window.Property(groupname),.1) + + + + + String.IsEqual(Window.Property(groupname),mainmenu) + !String.IsEqual(Container(211).ListItem.Property(skinshortcuts-disabled),True) + Dialog_Standard_Button + !String.EndsWith(Window.Property(groupname),.1) + Skin.HasSetting(VerticalHome) @@ -211,21 +259,31 @@ String.IsEqual(Window.Property(groupname),mainmenu) !String.IsEqual(Container(211).ListItem.Property(skinshortcuts-disabled),True) Dialog_Standard_Button + !String.EndsWith(Window.Property(groupname),.1) - + !String.IsEqual(Container(211).ListItem.Property(skinshortcuts-disabled),True) $INFO[Container(211).ListItem.Property(widgetName)] - String.IsEqual(Container(211).ListItem.Property(path),ActivateWindow(1135)) | !Skin.HasSetting(SubmenuOnly) | Skin.HasSetting(VerticalHome) + String.IsEqual(Container(211).ListItem.Property(path),ActivateWindow(1135)) | !Skin.HasSetting(SubmenuOnly) Dialog_Standard_Button + !String.EndsWith(Window.Property(groupname),.1) - + !String.IsEqual(Container(211).ListItem.Property(skinshortcuts-disabled),True) $INFO[Container(211).ListItem.Property(widgetAspect)] - String.IsEqual(Container(211).ListItem.Property(path),ActivateWindow(1135)) | !Skin.HasSetting(SubmenuOnly) | Skin.HasSetting(VerticalHome) + String.IsEqual(Container(211).ListItem.Property(path),ActivateWindow(1135)) | !Skin.HasSetting(SubmenuOnly) | [Skin.HasSetting(VerticalHome) + String.EndsWith(Window.Property(groupname),.1)] + Dialog_Standard_Button + + + + + !String.IsEqual(Container(211).ListItem.Property(skinshortcuts-disabled),True) + $INFO[Container(211).ListItem.Property(widgetTarget)] + Skin.HasSetting(VerticalHome) + String.EndsWith(Window.Property(groupname),.1) Dialog_Standard_Button @@ -238,28 +296,22 @@ String.IsEqual(Window.Property(groupname),mainmenu) !Skin.HasSetting(VerticalHome) Dialog_Standard_Button + !String.EndsWith(Window.Property(groupname),.1) - - $INFO[Container(211).ListItem.Property(background)] String.IsEqual(Window.Property(groupname),mainmenu) !String.IsEqual(Container(211).ListItem.Property(skinshortcuts-disabled),True) Dialog_Standard_Button + !String.EndsWith(Window.Property(groupname),.1) !String.IsEqual(Container(211).ListItem.Property(skinshortcuts-disabled),True) Dialog_Standard_Button + !String.EndsWith(Window.Property(groupname),.1) diff --git a/addon.xml b/addon.xml index a8075473..f57ac4aa 100644 --- a/addon.xml +++ b/addon.xml @@ -1,4 +1,4 @@ - + diff --git a/changelog.txt b/changelog.txt index 0503c157..473cd91a 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +0.9.10 +Rewrite widget code for better handling + 0.9.9 Fix for programs menu Scrolling for horizontal menu (no limit on number of items) diff --git a/language/resource.language.en_gb/strings.po b/language/resource.language.en_gb/strings.po index 496a1d6d..5b466e71 100644 --- a/language/resource.language.en_gb/strings.po +++ b/language/resource.language.en_gb/strings.po @@ -500,6 +500,21 @@ msgctxt "#31097" msgid "Ends at" msgstr "" +#: /1080i/script-skinshortcuts.xml +msgctxt "#31098" +msgid "Choose widget" +msgstr "" + +#: /1080i/script-skinshortcuts.xml +msgctxt "#31099" +msgid "Widgets" +msgstr "" + +#: /1080i/script-skinshortcuts.xml +msgctxt "#31100" +msgid "Content type" +msgstr "" + msgctxt "#31101" msgid "items" msgstr "" diff --git a/shortcuts/overrides.xml b/shortcuts/overrides.xml index 911e04b6..80f3ace6 100644 --- a/shortcuts/overrides.xml +++ b/shortcuts/overrides.xml @@ -56,17 +56,20 @@ Widget + Poster Square Icon Landscape - Poster - Square - Icon - Landscape - + + videos + music + pictures + programs + + special://skin/extras/icons/livetv.png diff --git a/shortcuts/template.xml b/shortcuts/template.xml index 322f419f..3a2f1ff9 100644 --- a/shortcuts/template.xml +++ b/shortcuts/template.xml @@ -1,74 +1,5 @@