How to add Shutdown Menu Button on Home screen?
#1
Hello,
how to add shutdown and reboot on home screen menu? thanks
Reply
#2
you just go down twice to the little button it the bottom left
Reply
#3
yes, true. but looking to add it to the main menu (next to Movies, System etc..). setting up xbmc on htpc for my folks and just keeping very simple....(and shutdown is something probably use much so nice to have it with just a click)
Reply
#4
Ahh oh then you need to open up 720p home.xml and look for about line 586 where you will see a <content> thing and in between that is a whole bunch of <item> </item> stuff that are the main menu items just copy paste one to create a new and change the <label> and <onclick> bits
Reply
#5
just so i get it right, what exactly should i replace with what; just so i get it right...thanks...

here is one of the item's i see under content i see
:
<item id="7">
<label>8</label>
<onclick>ActivateWindow(Weather)</onclick>
<icon>special://skin/backgrounds/weather.jpg</icon>
<thumb>$INFO[Skin.String(Home_Custom_Back_Weather_Folder)]</thumb>
<visible>!Skin.HasSetting(HomeMenuNoWeatherButton) + !IsEmpty(Weather.Plugin)</visible>
</item>
Reply
#6
Based on Jezz_X's suggestions, I was able to get the "Shutdown/Quit/Exit" label on the Main Menu. (I used Exit for my Label). Make a backup of the home file before doing anything.
Here is what I modified:
1. Added new item as <item id="12"> Must be a unique id number
2. Added <label>Exit</label> (I could not find where the codes were referenced, they weren't in strings.xml so I just made a text label.)
3. Added <onclick>XBMC.Quit()</onclick> I believe this is the command to shut down XBMC
4. If you want to add a unique background for this selection, name it shutdown.jpg and place it in the backgrounds folder. Then reference it using <icon>special://skin/backgrounds/shutdown.jpg</icon>. Otherwise, whatever file is referenced in the <icon></icon> section will appear.
5. I deleted the <thumb> and <visible> lines with no apparent ill effect.
6. Save the modified home.xml file

I am not well versed in xml programming, so I am not sure if this will do the trick in all situations, but it seemed to work for me. I did not attempt to remove the original shutdown button in the lower left corner, but I assume that could be done by commenting out the appropriate lines.

Hope that helps.
Reply
#7
(2012-04-16, 16:00)snavaro Wrote: Based on Jezz_X's suggestions, I was able to get the "Shutdown/Quit/Exit" label on the Main Menu. (I used Exit for my Label). Make a backup of the home file before doing anything.
Here is what I modified:
1. Added new item as <item id="12"> Must be a unique id number
2. Added <label>Exit</label> (I could not find where the codes were referenced, they weren't in strings.xml so I just made a text label.)
3. Added <onclick>XBMC.Quit()</onclick> I believe this is the command to shut down XBMC
4. If you want to add a unique background for this selection, name it shutdown.jpg and place it in the backgrounds folder. Then reference it using <icon>special://skin/backgrounds/shutdown.jpg</icon>. Otherwise, whatever file is referenced in the <icon></icon> section will appear.
5. I deleted the <thumb> and <visible> lines with no apparent ill effect.
6. Save the modified home.xml file

I am not well versed in xml programming, so I am not sure if this will do the trick in all situations, but it seemed to work for me. I did not attempt to remove the original shutdown button in the lower left corner, but I assume that could be done by commenting out the appropriate lines.

Hope that helps.
thanks..;I'll try it out but with "XBMC.Quit" looks like will only quit XBMC but not shut down the system. what will be the code to have it shutdown...

Reply
#8
You might try XBMC.Shutdown() but I am not an XML Programmer so I am not sure if that is a valid command. Can' t hurt to try it. Maybe someone else can help out.
OK. I think I found it in the DialogButtonMenu.xml file around line 89. Try <onclick>XBMC.Powerdown()</onclick>
Reply
#9
I have a question that I am sure only a novice would ask. In the home.xml file, the menu items are labeled with id numbers (eg. <label>21034</label>), and not the actual text that appears on the home screen (ie Weather, Video, Movies, Programs, Settings, etc.) I know that somewhere there must be a cross reference to these labels, but I have been unable to find how the program knows what to replace the label id numbers with. I looked in the strings.xml file and I could not find it there. Thanks for any insight.
Reply
#10
(2012-04-16, 22:50)snavaro Wrote: I have a question that I am sure only a novice would ask. In the home.xml file, the menu items are labeled with id numbers (eg. <label>21034</label>), and not the actual text that appears on the home screen (ie Weather, Video, Movies, Programs, Settings, etc.) I know that somewhere there must be a cross reference to these labels, but I have been unable to find how the program knows what to replace the label id numbers with. I looked in the strings.xml file and I could not find it there. Thanks for any insight.

Never mind. I found my answer in the Wiki. The labels are cross-referenced in the XBMC/Resources/Language tree structure in the strings.xml file. I did not think to look under resources.Tongue
Reply
#11
Thanks that works a treat

Now that got me thinking ............
Reply

Logout Mark Read Team Forum Stats Members Help
How to add Shutdown Menu Button on Home screen?0