Solved Skin Setting
#1
Information 
Hello everyone,
I'm trying to make XBMC reset a certain setting to a "default" value each time it starts.

Ok, so i made a custom setting type bool, by adding the following line in guisettings.xml
Code:
<setting type="bool" name="skin.confluence.setting_name">false</setting>

I retrieve/set it using the following built-in functions:
Code:
Skin.SetBool(setting_name) #Set to true
Skin.Reset(setting_name) #Set to false
Skin.HasSetting(setting_name) #Retrieve it

Thing is i want this setting to always be false on a fresh start and then i change it according to my needs inside the skin.
Right now if i happen to close xbmc while this setting is true, the next start-up the initial value will be true.

Is there anyway i could tell xbmc to have an initial value of a certain setting on startup ?

Thanks.
I wrote a program to program my program ! - programception.
Reply
#2
Did you check Advancedsettings.xml

http://wiki.xbmc.org/index.php?title=Adv...ttings.xml
Reply
#3
Better to use window properties then.
Code:
SetProperty(foo,bar,home)
ClearProperty(foo,home)

to check use stringcompare on the property.

If you want to use skin setting put this in startup.xml:

Code:
<onload>Skin.Reset(foo)</onload>
Reply
#4
@warlion: Yeah i did, but adavancedsettings.xml would prevent me from changing the setting after the startup i want to be able to change it on run-time but always be false on a fresh startup.

@BigNoid: Wow thanks a million the startup.xml onload trick worked like a charm didn't even know that file existed, btw the file only gets called once on startup as the name suggests right ? just wanted to make sure
I wrote a program to program my program ! - programception.
Reply
#5
yep
Reply

Logout Mark Read Team Forum Stats Members Help
Skin Setting0