Custom Build Ques: stop spark from reading some settings from spark.properties?

Ok folks,

here is a tough one:

I am building a custom version of Spark using the source code.

I want to stop spark from reading a couple of settings from the spark.properties file:

  • idleTime=3
  • idleOn=true

I want that even if the user manually edits this file, spark should ignore these two entries in the file. I dont have much Java coding experience, hence I am asking for your help here. Which file in the source code should I edit?

I have already managed to take out these two settings from preferences panel:

  • Time till idle (field)
  • Idle enabled (checkbox)

Please view the attachment.

Why I am doing all this is described here:

Any tips?

Ok I figured it out by some Java coder’s help:

basically, changing this file:

\src\java\org\jivesoftware\sparkimpl\settings\local\LocalPreferences.java

Line # 102 to this:

/**

  • Return true if the IDLE feature is on. The IDLE feature allows to monitor

  • computer activity and set presence accordingly.

  • @return true if IDLE is on.

*/

/**

public boolean isIdleOn() {

return Boolean.parseBoolean(props.getProperty(“idleOn”, “true”));

}

*/

** public boolean isIdleOn() {**

** return true;**

more info:

for the other entry:

/**

  • Returns the number of minutes to set to unavailable if the computer has

  • no activity.

  • @return the number of minutes before checking for IDLE computer.

*/

public int getIdleTime() {

/** return Integer.parseInt(props.getProperty(“idleTime”, “3”));*/

return 3;

}