summaryrefslogtreecommitdiff
path: root/altosui
diff options
context:
space:
mode:
authorMike Beattie <mike@ethernal.org>2012-09-14 00:53:56 +1200
committerMike Beattie <mike@ethernal.org>2012-09-14 17:51:52 +1200
commit08345b8909922f2ff8f9ed8b4497b9cbea6b26e9 (patch)
tree334552995bc12f913609ce46e217652ed25a8546 /altosui
parent17127847300de9a6782b901926a3fcb9ef021b78 (diff)
altosui/altoslib: Add call to …Preferences.init() with backend object, remove static init()
Signed-off-by: Mike Beattie <mike@ethernal.org>
Diffstat (limited to 'altosui')
-rw-r--r--altosui/AltosUI.java1
-rw-r--r--altosui/AltosUIPreferences.java6
2 files changed, 4 insertions, 3 deletions
diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java
index b5cbefe7..52b6b128 100644
--- a/altosui/AltosUI.java
+++ b/altosui/AltosUI.java
@@ -98,6 +98,7 @@ public class AltosUI extends AltosFrame {
load_library(null);
+ AltosUIPreferences.init(new AltosUIPreferencesBackend());
AltosUIPreferences.set_component(this);
pane = getContentPane();
diff --git a/altosui/AltosUIPreferences.java b/altosui/AltosUIPreferences.java
index 6e4c9097..c1087dd6 100644
--- a/altosui/AltosUIPreferences.java
+++ b/altosui/AltosUIPreferences.java
@@ -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) {
+ super(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;
}