How do i enable Preferences in source code?

Hello, i´d like to know what i have to change to enable preferences, turning some options enabled for default.

Some examples:

“Play sound when new message arrives”

“Disable showing previous conversation in chat”

I looking for this for along time, should i hgave posted here a long time ago … rsrsrs

What file should i change before compile to enable this preferences for default?

After a few days of work, limited to my knowledge in programing i found part of my solution.

Theres many files of configuration for preferences, the unique who has a “pre” configuration in the source code its the one from PREFERENCES >SOUNDS

In root\src\java\org\jivesoftware\sparkimpl\preference\sounds\SoundPreferences.jav a

I have change from **false to true **and compile my client again, it works

private boolean playOutgoingSound = true;
    private boolean playIncomingSound = true;
    private boolean playOfflineSound = false;
    private boolean playIncomingInvitationSound = true;

I did a few changes, setting my server in the login scren and notification, when someone connect to server, but these one in particular have no way to “permanet change”, if i set these variables in code, all times an user open spark client, he´ll have to change again. In the sound panel its different, cause theres a particular class implemented to do this, and other to look for user preferences in some .xml file, in my case located in


so i have to delete this file before reinstalation of spark.

I have a custom branded version in my company, so when some new version is released i make a few changes too, you can see my work in