2014-05-21, 13:59
(2014-05-21, 04:13)jcorsaut Wrote: Thanks, I appreciate you taking a look at this. I'm not really concerned whether it looks like the confluence addon shortcuts or not. If there is ability to access commonly used addons in icon format within a widget, that works great too.
OK, I've had a play with this, and it's possible to add a new widget to which you can add anything you want - add ons included - with three changes to Nox5's code.
First, add a new widget to choose from, in custom_1124_WidgetCustomizer.xml
Code:
<item>
<label>My Shortcuts</label>
<onclick>Skin.SetString(ItemToEdit.Widget,12)</onclick>
<onclick>Skin.SetString(ItemToEdit.WidgetLabel,My Shortcuts)</onclick>
<onclick>Dialog.Close(1124)</onclick>
<onclick>Skin.SetString(ItemToEdit.WidgetType,4)</onclick>
</item>
Next, a button to allow the editing of items in this new widget (works well right after button 90014), in custom_1121_HomeMenuCustomizer.xml
Code:
<control type="button" id="90100">
<description>Manage widget shortcuts</description>
<width>1316</width>
<height>90</height>
<textoffsetx>30</textoffsetx>
<font>font15</font>
<label>Manage widget shortcuts</label>
<texturenofocus border="1">separator5.png</texturenofocus>
<onclick>RunScript(script.skinshortcuts,type=manage&group=$INFO[Container(90000).ListItem.Property(submenuVisibility)]-1)</onclick>
<visible>System.HasAddon(script.skinshortcuts) + StringCompare(Container(90000).ListItem.Property(Widget),12)</visible>
</control>
And finally to display the new widget, in variables.xml, the variable WidgetListContent - somewhere around line 420, preferably the line above the value without a condition
Code:
<value condition="StringCompare(Container(9000).ListItem.Property(Widget),12)">plugin://script.skinshortcuts?type=list&group=$INFO[Container(9000).ListItem.Property(SubmenuVisibility)]-1</value>
And jobs a good'un.