altosui: revert AltosUIPreferences init() method
authorMike Beattie <mike@ethernal.org>
Thu, 13 Sep 2012 13:27:22 +0000 (01:27 +1200)
committerMike Beattie <mike@ethernal.org>
Fri, 14 Sep 2012 05:51:53 +0000 (17:51 +1200)
Signed-off-by: Mike Beattie <mike@ethernal.org>
altosui/AltosUI.java
altosui/AltosUIPreferences.java

index 52b6b128c16bf411b7a3521d1aa2749ee6697c79..b5cbefe73a352ae78362c3d1c4679b5eef21a8c9 100644 (file)
@@ -98,7 +98,6 @@ public class AltosUI extends AltosFrame {
 
                load_library(null);
 
-               AltosUIPreferences.init(new AltosUIPreferencesBackend());
                AltosUIPreferences.set_component(this);
 
                pane = getContentPane();
index 4ef9384d0ceb862a6f3c5a1efa41def1396b043a..a28c07b06a9c5202cb71989b99012332eedc587e 100644 (file)
@@ -45,8 +45,8 @@ public class AltosUIPreferences extends AltosPreferences {
        /* Serial debug */
        static boolean serial_debug;
 
-       public static void init(AltosUIPreferencesBackend in_backend) {
-               AltosPreferences.init(in_backend);
+       public static void init() {
+               AltosPreferences.init(new AltosUIPreferencesBackend());
 
                font_listeners = new LinkedList<AltosFontListener>();
 
@@ -59,6 +59,8 @@ public class AltosUIPreferences extends AltosPreferences {
                AltosLink.set_debug(serial_debug);
        }
 
+       static { init(); }
+
        static void set_component(Component in_component) {
                component = in_component;
        }