Kodi Community Forum
How to add Suspend, Logout to Home - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Skins Support (https://forum.kodi.tv/forumdisplay.php?fid=67)
+---- Forum: Skin Archive (https://forum.kodi.tv/forumdisplay.php?fid=179)
+----- Forum: Night (https://forum.kodi.tv/forumdisplay.php?fid=130)
+----- Thread: How to add Suspend, Logout to Home (/showthread.php?tid=104750)



[HOW TO] add Suspend, Logout to Home - mac666 - 2011-07-03

Hey,
After my last post i figured it out myself, dunno if this is 100% failsafe or anything.

Anyway,
What i did was i went opened /~/.xbmc/addons/skin.night/720p/Home.xml in gedit
Find item id="13", that is the xml data for the Shutdown-button.
My version of this is really ugly, but it works.
Edit it the whole item tag to this:
PHP Code:
                <item id="13">
                    <
label>Suspend</label>
                    <
icon>special://skin/backgrounds/shutdown.jpg</icon>
                    
<thumb>$INFO[Skin.String(Home_Custom_Back_Shutdown_Folder)]</thumb>
                    <
onclick>Suspend()</onclick>
                    <
visible>Skin.HasSetting(HomeMenuNoShutdownButton)</visible>
                </
item

It will only be shown if you have Shutdown shown in the Skin settings, remove "visible" tag if you always want to show it.
You can allso make a new one with unique item ID, you dont need to replace shutdown then.
Then i added this t o the line below:
PHP Code:
<item id="666">
                    <
label>Log off</label>
                    <
icon>special://skin/backgrounds/shutdown.jpg</icon>
                    
<thumb>$INFO[Skin.String(Home_Custom_Back_Shutdown_Folder)]</thumb>
                    <
onclick>System.LogOff</onclick>
                    <
visible>Skin.HasSetting(HomeMenuNoShutdownButton)</visible>
                </
item
This has the same settings as the line above, exept another onclick function and label.
There can be alot of improvements to this, you might even be able to add it with Custom home items, but i dont have time to dig deeper into this.

Cheers