From c8078d352a7f54a4a97d25af080155d3f875536a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 16 Jun 2014 22:49:34 -0700 Subject: java: Bump java library versions for next release Prepare for future release by bumping java versions now Signed-off-by: Keith Packard --- altosui/AltosConfigureUI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'altosui/AltosConfigureUI.java') diff --git a/altosui/AltosConfigureUI.java b/altosui/AltosConfigureUI.java index e61a4a5b..80d6d341 100644 --- a/altosui/AltosConfigureUI.java +++ b/altosui/AltosConfigureUI.java @@ -22,7 +22,7 @@ import java.awt.event.*; import java.beans.*; import javax.swing.*; import javax.swing.event.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altosuilib_3.*; public class AltosConfigureUI extends AltosUIConfigure -- cgit v1.2.3 From 5f5b03879d9daa68a56498b45ae87a804cb1926b Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 10 Jul 2014 18:43:31 -0700 Subject: 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 --- altosui/AltosConfigureUI.java | 8 +++++++- altosuilib/AltosDeviceDialog.java | 3 ++- altosuilib/AltosUIConfigure.java | 3 ++- altosuilib/AltosUILib.java | 8 ++++++++ 4 files changed, 19 insertions(+), 3 deletions(-) (limited to 'altosui/AltosConfigureUI.java') diff --git a/altosui/AltosConfigureUI.java b/altosui/AltosConfigureUI.java index 80d6d341..85a3f6c0 100644 --- a/altosui/AltosConfigureUI.java +++ b/altosui/AltosConfigureUI.java @@ -89,6 +89,8 @@ public class AltosConfigureUI row++; } + boolean has_bluetooth; + public void add_bluetooth() { JButton manage_bluetooth = new JButton("Manage Bluetooth"); manage_bluetooth.addActionListener(new ActionListener() { @@ -98,6 +100,7 @@ public class AltosConfigureUI }); pane.add(manage_bluetooth, constraints(0, 2)); /* in the same row as add_frequencies, so don't bump row */ + has_bluetooth = true; } public void add_frequencies() { @@ -108,7 +111,10 @@ public class AltosConfigureUI } }); manage_frequencies.setToolTipText("Configure which values are shown in frequency menus"); - pane.add(manage_frequencies, constraints(2, 1)); + if (has_bluetooth) + pane.add(manage_frequencies, constraints(2, 1)); + else + pane.add(manage_frequencies, constraints(0, 3)); row++; } 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; -- cgit v1.2.3