]> git.gag.com Git - fw/altos/blobdiff - altosui/AltosUIPreferences.java
altosui: Add return to try/catch.. duh
[fw/altos] / altosui / AltosUIPreferences.java
index 03e8e1290936e21de066365f44e1f7a9fe4e4d7f..4ef9384d0ceb862a6f3c5a1efa41def1396b043a 100644 (file)
@@ -45,7 +45,9 @@ public class AltosUIPreferences extends AltosPreferences {
        /* Serial debug */
        static boolean serial_debug;
 
-       public static void init() {
+       public static void init(AltosUIPreferencesBackend in_backend) {
+               AltosPreferences.init(in_backend);
+
                font_listeners = new LinkedList<AltosFontListener>();
 
                font_size = backend.getInt(fontSizePreference, Altos.font_size_medium);
@@ -57,8 +59,6 @@ public class AltosUIPreferences extends AltosPreferences {
                AltosLink.set_debug(serial_debug);
        }
 
-       static { init(); }
-
        static void set_component(Component in_component) {
                component = in_component;
        }
@@ -98,7 +98,7 @@ public class AltosUIPreferences extends AltosPreferences {
                }
        }
        public static int font_size() {
-               synchronized (preferences) {
+               synchronized (backend) {
                        return font_size;
                }
        }
@@ -144,7 +144,7 @@ public class AltosUIPreferences extends AltosPreferences {
        }
 
        public static String look_and_feel() {
-               synchronized (preferences) {
+               synchronized (backend) {
                        return look_and_feel;
                }
        }
@@ -170,7 +170,7 @@ public class AltosUIPreferences extends AltosPreferences {
        }
 
        public static boolean serial_debug() {
-               synchronized (preferences) {
+               synchronized (backend) {
                        return serial_debug;
                }
        }