fixed another bug with default look&feel

git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@12192 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Wolf Posdorfer
2011-03-28 08:49:54 +00:00
committed by wolf.posdorfer
parent 955207904f
commit b1d7aae6cd
2 changed files with 11 additions and 5 deletions

View File

@ -213,7 +213,7 @@ public final class Spark {
private void loadLookAndFeel() {
final LocalPreferences preferences = SettingsManager.getLocalPreferences();
final String laf;
if (preferences.getLookAndFeel().length() > 0 && !Default.getBoolean("LOOK_AND_FEEL_DISABLED")) {
if (!Default.getBoolean("LOOK_AND_FEEL_DISABLED")) {
laf = preferences.getLookAndFeel();
} else if (Default.getString(Default.DEFAULT_LOOK_AND_FEEL).length() > 0) {
laf = Default.getString(Default.DEFAULT_LOOK_AND_FEEL);

View File

@ -21,6 +21,7 @@
package org.jivesoftware.sparkimpl.settings.local;
import org.jivesoftware.Spark;
import org.jivesoftware.resource.Default;
import org.jivesoftware.spark.SparkManager;
import java.io.File;
import java.util.Date;
@ -663,10 +664,15 @@ public class LocalPreferences {
setString("LookAndFeel",laf);
}
public String getLookAndFeel() {
String defaultstring = UIManager.getSystemLookAndFeelClassName();
return getString("LookAndFeel", defaultstring);
}
public String getLookAndFeel() {
String defaultstring = "";
try {
defaultstring = Default.getString("DEFAULT_LOOK_AND_FEEL");
} catch (Exception e) {
defaultstring = UIManager.getSystemLookAndFeelClassName();
}
return getString("LookAndFeel", defaultstring);
}
public void setCheckForBeta(boolean checkForBeta) {
setBoolean("checkForBeta", checkForBeta);