Modding shutdown menu i need API
#1
Hello there,
i want to mod the behavior of a single voice of the main menu (shutdown section). I have an imac and i want that one voice of the shutdown menu put my display to sleep. I've choose the hibernate voice (in the night skin) because the hibernation isn't supported by mac.
I've navigated through my XBMC.app until i've find the XML files that make the skin work. I've edited the home.xml file and i can read this code:
Code:
<control type="button" id="90187">                        <include>ButtonHomeSubCommonValues</include>
    <label>13010</label>
    <onclick>Hibernate()</onclick>
</control>
What i want to know is which function i've to write in the onclick section to put my display to sleep.
Anyone can help me? It would be intresting to find also a reference about the XBMC's api, can you link me a site?
thank you
Reply
#2
what voice are uour talking about ? you want to modify sound?
Reply
#3
emh no... i want to modify the behavior of the hibernate menu voice in the sub menu shutdown.
If i click on hibernate it doesn't happen anything, because the doesn't hibernate itself Big Grin So i want to modify the code i've quoted in something like this:
Code:
<control type="button" id="90187">                        <include>ButtonHomeSubCommonValues</include>
    <label>13010</label>
    <onclick>SleepDisplayFunction()</onclick>
</control>
But i don't know the correct SleepDisplayFunction.
I hope that i've explained clearly my idea Big Grin
Reply
#4
Shutdown()?

but i still don't understand why you are talking about voice !
Reply
#5
Try "ToggleDPMS()".
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#6
@ppics With menu voice i want to mean a single line of a menu (i don't know if is the correct english translation of the italian "voce di menu", but i think so Big Grin). Shutdown() makes the Imac shutting down ^^

@vdrfan
Thanks, now i try.

EDIT:
Very very thanks to vdrfan ^^ Your suggestion is right!!! Can i ask you where you find the api used by XMBC?
Reply
#7
ok, i thought you want to shutdown, sorry Sad

good you find
Reply
#8
Don't worry ppic, thank you for trying to help me.
Now i want to go to the next step: rename Hibernate in Display Sleep. I'm searching the label 13010 in the string.xml, but i can't find it there... Is there another place where to search it?
Reply
#9
Most of the current Bult-ins are documented in the wiki. http://wiki.xbmc.org/?title=List_of_Built_In_Functions.

For a complete list you could always check the source code (http://trac.xbmc.org/browser/trunk/xbmc/...iltins.cpp - Line 100+).
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#10
Uhm, 13010 is in strings.xml. Search for '<string id="13010">'.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#11
Ok, i've found it. I was searching in the string.xml of the night skin... thank you another time ^^
Reply
#12
hey guys this is exactly what i'm needing to do since my XBMC box is also a general server.

i was just wondering was this a source code edit? or am i just missing what file needs to be edited?
Reply
#13
c8a7w Wrote:hey guys this is exactly what i'm needing to do since my XBMC box is also a general server.

i was just wondering was this a source code edit? or am i just missing what file needs to be edited?

I don' understand the question. Anyway i'try: this is only an editing of a configuration file, you don't edit any source code.
Reply

Logout Mark Read Team Forum Stats Members Help
Modding shutdown menu i need API0