summaryrefslogtreecommitdiff
path: root/altosuilib
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-07-10 18:43:31 -0700
committerKeith Packard <keithp@keithp.com>2014-07-10 18:43:31 -0700
commit5f5b03879d9daa68a56498b45ae87a804cb1926b (patch)
treee4894fe10897dc90f75eb1a424566029812f095d /altosuilib
parentaac3fdce54233993c91d326df3732a7c448ac54a (diff)
altosui: Don't show bluetooth UI bits on mac/windows
This just confuses people into thinking that bluetooth is supported on those machines. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosuilib')
-rw-r--r--altosuilib/AltosDeviceDialog.java3
-rw-r--r--altosuilib/AltosUIConfigure.java3
-rw-r--r--altosuilib/AltosUILib.java8
3 files changed, 12 insertions, 2 deletions
diff --git a/altosuilib/AltosDeviceDialog.java b/altosuilib/AltosDeviceDialog.java
index 0875bea7..d2ccd5e7 100644
--- a/altosuilib/AltosDeviceDialog.java
+++ b/altosuilib/AltosDeviceDialog.java
@@ -131,7 +131,8 @@ public abstract class AltosDeviceDialog extends AltosUIDialog implements ActionL
buttonPane.add(cancel_button);
buttonPane.add(Box.createRigidArea(new Dimension(10, 0)));
- add_bluetooth();
+ if (AltosUILib.has_bluetooth)
+ add_bluetooth();
buttonPane.add(select_button);
diff --git a/altosuilib/AltosUIConfigure.java b/altosuilib/AltosUIConfigure.java
index 5648d1df..9c0f3bc7 100644
--- a/altosuilib/AltosUIConfigure.java
+++ b/altosuilib/AltosUIConfigure.java
@@ -283,7 +283,8 @@ public class AltosUIConfigure
add_look_and_feel();
add_position();
add_map_cache();
- add_bluetooth();
+ if (AltosUILib.has_bluetooth)
+ add_bluetooth();
add_frequencies();
/* And a close button at the bottom */
diff --git a/altosuilib/AltosUILib.java b/altosuilib/AltosUILib.java
index 0050f12c..8fa7dfe6 100644
--- a/altosuilib/AltosUILib.java
+++ b/altosuilib/AltosUILib.java
@@ -80,6 +80,7 @@ public class AltosUILib extends AltosLib {
static public boolean initialized = false;
static public boolean loaded_library = false;
+ static public boolean has_bluetooth = false;
static final String[] library_names = { "altos", "altos32", "altos64" };
@@ -96,6 +97,13 @@ public class AltosUILib extends AltosLib {
loaded_library = false;
}
}
+
+ String OS = System.getProperty("os.name");
+
+ if (OS.startsWith("Linux")) {
+ has_bluetooth = true;
+ }
+
initialized = true;
}
return loaded_library;