Linux How to apply settings directly after they are changed?
#1
Question 
Hello,

I'm trying to create an addon that can change audio hardware settings through USB. The problem I'm facing is that settings have to be applied by pressing OK button. Ik would like to get rid of this way to change settings and apply changes for example the way XBMC system settings are changed: 'immediately' after changing a setting this change will be applied.

A nice to have would also be Standard/Advanced level settings as it was introduced in Gotham.

As an example of settings that can be changed I would like to change the brightness of a LED on a frontpanel. Change it a bit and press OK doesnt really work the way it should: immediate feedback.
Same for sound balance between left and right speaker.

I there a way to do this or is the only way to adjust a skin myself to accomplish this?

Any help is welcome! Big Grin


PS I tried to delete my post in thread "Add-ons Help and Support". I'm not allowed to delete it...
Reply
#2
The settings for the addon are only saved when you click OK. You might be able to have the button in the settings call a script which makes the change to the hardware, but I dont know how you could then also have the appearance of the button in the settings change at the same time.

You may need to create your own custom settings GUI, which can be constantly reading the attribute.

It will mean you cant do certain things like the slider though. That is only available in the regular addon settings.
Reply
#3
(2014-10-02, 03:45)Karnagious Wrote: The settings for the addon are only saved when you click OK. You might be able to have the button in the settings call a script which makes the change to the hardware, but I dont know how you could then also have the appearance of the button in the settings change at the same time.

You may need to create your own custom settings GUI, which can be constantly reading the attribute.

It will mean you cant do certain things like the slider though. That is only available in the regular addon settings.



Thank you for your reply. I was already afraid for that.
Maybe I can use the System settings page and add extra settings. Ofcourse I prefer not to change specific skins. I already had to do that, so maybe just go for that.

Examples welcome of putting settings somewhere else! :-)

Thx again!
Reply
#4
As it was said above, you can create your own GUI with necessary settings. You can consider my PyXBMCt framework, which includes Slider among other Controls.
Reply
#5
(2014-10-03, 11:06)Roman_V_M Wrote: As it was said above, you can create your own GUI with necessary settings. You can consider my PyXBMCt framework, which includes Slider among other Controls.


Thank you for your reaction.
I installed pyXBCMt recently but havent really played with it yet.
Time to do that then. Thanks for the tip!
Reply

Logout Mark Read Team Forum Stats Members Help
How to apply settings directly after they are changed?0