X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosPreferences.java;h=c6ae6cbd176d39cdae30b075f77fc2812f065df4;hb=440d52e34364fdeeddc76a2d744cc6d1c934364f;hp=e2a3df3b7717bb5b92f9cf150706bdc49a7ecbb3;hpb=f01096c4b42f9a4720ed0414826c2a283a992545;p=fw%2Faltos diff --git a/altosui/AltosPreferences.java b/altosui/AltosPreferences.java index e2a3df3b..c6ae6cbd 100644 --- a/altosui/AltosPreferences.java +++ b/altosui/AltosPreferences.java @@ -52,6 +52,9 @@ class AltosPreferences { /* Log directory */ static File logdir; + /* Map directory -- hangs of logdir */ + static File mapdir; + /* Channel (map serial to channel) */ static Hashtable channels; @@ -79,6 +82,9 @@ class AltosPreferences { if (!logdir.exists()) logdir.mkdirs(); } + mapdir = new File(logdir, "maps"); + if (!mapdir.exists()) + mapdir.mkdirs(); channels = new Hashtable(); @@ -106,6 +112,9 @@ class AltosPreferences { public static void set_logdir(File new_logdir) { logdir = new_logdir; + mapdir = new File(logdir, "maps"); + if (!mapdir.exists()) + mapdir.mkdirs(); synchronized (preferences) { preferences.put(logdirPreference, logdir.getPath()); flush_preferences(); @@ -151,6 +160,10 @@ class AltosPreferences { return logdir; } + public static File mapdir() { + return mapdir; + } + public static void set_channel(int serial, int new_channel) { channels.put(serial, new_channel); synchronized (preferences) {