Change order of options on Shutdown Menu
#1
I'd like to modify the order of the menu options on the Shutdown menu so that the Power Off option is first. This is the first time I've tried modifying the menus (or anything in the skin, for that matter), and I got as far as getting to the /usr/share/xbmc/addons/skin.confluence/720p directory (this is running under XBMCbuntu) and editing the DialogButtonMenu.xml file. I figured the simplest thing to do would be to just reorder the Exit & Shutdown buttons. I tried that, and the menu definitely reflected the change. However, it seems like all the options then act as if I'd just selected "Exit", meaning I get the login prompt. I did change the "id=" number when swapping the buttons (so that id=2 was now for "Shutdown Button" and id=3 was for Exit) but that didn't seem to make a difference. (I will willingly admit that was a total shot in the dark).

I'm trying to avoid learning absolutely everything there is to know about building skins, so I apologize for probably missing something obvious in the "developing a skin" section of the WIki, but I'm hoping one of you fine folk could point me in the right direction. I'm quite comfortable editing the files manually, I'm just not quite sure what to do.

Currently running Frodo 12.2 under XMBMbuntu 11.10 (oneiric).
Reply
#2
I too would like to be able to do this and am similarly stuck. My desire is to have Suspend be the first option.
Reply
#3
So, I figured this out. Big Grin

You need to cut/copy the whole control to the top of the control stack (paste it right above the exit control). Then you need to swap the IDs of those controls. For you your new button id on the shutdown function will be 2 and the exit button will be three.

This worked for me. I also backed up the original xml just in case.



Code:
<control type="button" id="3">
                <description>Shutdown button</description>
                <width>340</width>
                <height>40</height>
                <textcolor>grey2</textcolor>
                <focusedcolor>white</focusedcolor>
                <align>center</align>
                <textwidth>290</textwidth>
                <texturefocus border="25,5,25,5">ShutdownButtonFocus.png</texturefocus>
                <texturenofocus border="25,5,25,5">ShutdownButtonNoFocus.png</texturenofocus>
                <onclick>XBMC.Powerdown()</onclick>
                <visible>System.CanPowerDown</visible>
                <pulseonselect>no</pulseonselect>
                <font>font13</font>
                <label>13016</label>
            </control>

For reference, this is my xml that has the suspend button swapped.
Reply
#4
This is exactly what I tried to do. The menu order moves around, but what's really weird is that Shutdown and Reboot (as well as Exit) all seem to perform the Exit function. In other words, I get dropped at the prompt to log back into xmbc (or switch to xbmcbuntu, etc.) Switching back to the original menu makes everything work fine, but of course I haven't made it do what I wanted to.

Here's my code for the first button:
Code:
<control type="button" id="2">
                                <description>Shutdown button</description>
                                <width>340</width>
                                <height>40</height>
                                <textcolor>grey2</textcolor>
                                <focusedcolor>white</focusedcolor>
                                <align>center</align>
                                <textwidth>290</textwidth>
                                <texturefocus border="25,5,25,5">ShutdownButtonFocus.png</texturefocus>
                                <texturenofocus border="25,5,25,5">ShutdownButtonNoFocus.png</texturenofocus>
                                <onclick>XBMC.Powerdown()</onclick>
                                <visible>System.CanPowerDown</visible>
                                <pulseonselect>no</pulseonselect>
                                <font>font13</font>
                                <label>13016</label>
                        </control>

I uploaded the whole thing here for comparison.

Oh, and I tried using your version and even though the items were in the right order, I had the same odd problem with "Shutdown" actually exiting (although I believe that Suspend did work OK).

What am I missing here?
Reply
#5
I'm not really sure. Did you make sure to swap the id numbers. I see that you set shut down to "2" but did you make exit "3". That's the only inconsistency I can think of.

My only other thought is that some how shutdown, shutdown timer, and cancel shutdown timer (only visible when timer has been set) are somehow linked together. Perhaps hitting shutdown actually executes the shutdown timer set to a time of 0 or other minuscule number. Try rearranging all three to the top of the set so that shutdown = id2, shutdown timer = id3, cancel timer = id4, exit =id 5, suspend =id6, hibernate = id7, and reboot = id 8


no idea if there's any validity to this, but it at least makes some logical sense.
Reply
#6
(2014-01-15, 04:56)Mike8913 Wrote: I'm not really sure. Did you make sure to swap the id numbers. I see that you set shut down to "2" but did you make exit "3". That's the only inconsistency I can think of.

I did do that, you can see it in the full version here.

(2014-01-15, 04:56)Mike8913 Wrote: My only other thought is that some how shutdown, shutdown timer, and cancel shutdown timer (only visible when timer has been set) are somehow linked together. Perhaps hitting shutdown actually executes the shutdown timer set to a time of 0 or other minuscule number. Try rearranging all three to the top of the set so that shutdown = id2, shutdown timer = id3, cancel timer = id4, exit =id 5, suspend =id6, hibernate = id7, and reboot = id 8

I guess I can try that, though I'm at the point where I'm thinking I'll just continue to live with the menu as-is, maybe see if anything changes in the next version.
Reply
#7
(2014-01-15, 04:40)dkozinn Wrote: This is exactly what I tried to do. The menu order moves around, but what's really weird is that Shutdown and Reboot (as well as Exit) all seem to perform the Exit function. In other words, I get dropped at the prompt to log back into xmbc (or switch to xbmcbuntu, etc.) Switching back to the original menu makes everything work fine, but of course I haven't made it do what I wanted to.

Here's my code for the first button:
Code:
<control type="button" id="2">
                                <description>Shutdown button</description>
                                <width>340</width>
                                <height>40</height>
                                <textcolor>grey2</textcolor>
                                <focusedcolor>white</focusedcolor>
                                <align>center</align>
                                <textwidth>290</textwidth>
                                <texturefocus border="25,5,25,5">ShutdownButtonFocus.png</texturefocus>
                                <texturenofocus border="25,5,25,5">ShutdownButtonNoFocus.png</texturenofocus>
                                <onclick>XBMC.Powerdown()</onclick>
                                <visible>System.CanPowerDown</visible>
                                <pulseonselect>no</pulseonselect>
                                <font>font13</font>
                                <label>13016</label>
                        </control>

I uploaded the whole thing here for comparison.

Oh, and I tried using your version and even though the items were in the right order, I had the same odd problem with "Shutdown" actually exiting (although I believe that Suspend did work OK).

What am I missing here?

Your code looks fine and it sounds very much like an issue with your user account permission in Ubuntu, maybe you don't have permission to power policies?
Reply
#8
(2014-01-16, 20:30)SpaceMonkey Wrote: Your code looks fine and it sounds very much like an issue with your user account permission in Ubuntu, maybe you don't have permission to power policies?

Certainly a logical conclusion, except that with the unmodified menu shutdown seems to work fine. However with that said, can you point me to where I could look to verify this? While my Unix (!) experience goes way back, I don't have a lot of experience with Ubuntu, or, more specifically, with XBMCbuntu and don't really know where to look for this. (I'll google in the meantime, just hoping that someone might have a quick "check this" type of answer.)

Thanks.
Reply
#9
I don't see how that would make any difference, but since it's generally a bad idea to modify the stock Confluence skin files (and maybe mess up the file permissions at the same time), try this.

- Copy the skin.confluence directory to your home/.xbmc/addons (if that's still the standard directory used, haven't used Linux versions for years)
- Rename it to skin.confluence.mod, change the id in the addon.xml to skin.confluence.mod, and give it a new name
- Make the mods to this custom Confluence, and make sure the that permissions and owner on DialogButtonMenu.xml match rest of the files
Reply
#10
That did the trick!

FWIW, I checked the file permissions in the original location and they were fine, but for whatever reason, the same modified DialogButtonMenu.xml worked fine when moved to my .xbmc directory. (Your path was correct, by the way).

Thanks for the step-by-step instructions, which not only did the trick, but helped me to understand how all these pieces fit together.

Problem solved!
Reply

Logout Mark Read Team Forum Stats Members Help
Change order of options on Shutdown Menu0