From e980b251e5a4d25410710a9aa89ef940e06b0d93 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 19 Mar 2011 18:43:52 -0700 Subject: [PATCH] altosui: Add software version to Configure AltosUI dialog Show this somewhere so we can figure out what is installed. Signed-off-by: Keith Packard --- altosui/AltosConfigureUI.java | 27 +++++++++++++++++---------- altosui/AltosVersion.java.in | 22 ++++++++++++++++++++++ altosui/Makefile.am | 1 + configure.ac | 1 + 4 files changed, 41 insertions(+), 10 deletions(-) create mode 100644 altosui/AltosVersion.java.in diff --git a/altosui/AltosConfigureUI.java b/altosui/AltosConfigureUI.java index ab3d950e..9a292c91 100644 --- a/altosui/AltosConfigureUI.java +++ b/altosui/AltosConfigureUI.java @@ -87,9 +87,16 @@ public class AltosConfigureUI c.anchor = GridBagConstraints.CENTER; pane.add(new JLabel ("Configure AltOS UI"), c); - /* Voice settings */ c.gridx = 0; c.gridy = 1; + c.gridwidth = 3; + c.fill = GridBagConstraints.NONE; + c.anchor = GridBagConstraints.CENTER; + pane.add(new JLabel (String.format("AltOS version %s", AltosVersion.version)), c); + + /* Voice settings */ + c.gridx = 0; + c.gridy = 2; c.gridwidth = 1; c.fill = GridBagConstraints.NONE; c.anchor = GridBagConstraints.WEST; @@ -108,7 +115,7 @@ public class AltosConfigureUI } }); c.gridx = 1; - c.gridy = 1; + c.gridy = 2; c.gridwidth = 1; c.weightx = 1; c.fill = GridBagConstraints.NONE; @@ -116,7 +123,7 @@ public class AltosConfigureUI pane.add(enable_voice, c); c.gridx = 2; - c.gridy = 1; + c.gridy = 2; c.gridwidth = 1; c.weightx = 1; c.fill = GridBagConstraints.NONE; @@ -131,7 +138,7 @@ public class AltosConfigureUI /* Log directory settings */ c.gridx = 0; - c.gridy = 2; + c.gridy = 3; c.gridwidth = 1; c.fill = GridBagConstraints.NONE; c.anchor = GridBagConstraints.WEST; @@ -145,7 +152,7 @@ public class AltosConfigureUI } }); c.gridx = 1; - c.gridy = 2; + c.gridy = 3; c.gridwidth = 2; c.fill = GridBagConstraints.BOTH; c.anchor = GridBagConstraints.WEST; @@ -153,7 +160,7 @@ public class AltosConfigureUI /* Callsign setting */ c.gridx = 0; - c.gridy = 3; + c.gridy = 4; c.gridwidth = 1; c.fill = GridBagConstraints.NONE; c.anchor = GridBagConstraints.WEST; @@ -162,7 +169,7 @@ public class AltosConfigureUI callsign_value = new JTextField(AltosPreferences.callsign()); callsign_value.getDocument().addDocumentListener(this); c.gridx = 1; - c.gridy = 3; + c.gridy = 4; c.gridwidth = 2; c.fill = GridBagConstraints.BOTH; c.anchor = GridBagConstraints.WEST; @@ -170,7 +177,7 @@ public class AltosConfigureUI /* Serial debug setting */ c.gridx = 0; - c.gridy = 4; + c.gridy = 5; c.gridwidth = 1; c.fill = GridBagConstraints.NONE; c.anchor = GridBagConstraints.WEST; @@ -186,7 +193,7 @@ public class AltosConfigureUI }); c.gridx = 1; - c.gridy = 4; + c.gridy = 5; c.gridwidth = 3; c.fill = GridBagConstraints.NONE; c.anchor = GridBagConstraints.WEST; @@ -200,7 +207,7 @@ public class AltosConfigureUI } }); c.gridx = 0; - c.gridy = 5; + c.gridy = 6; c.gridwidth = 3; c.fill = GridBagConstraints.NONE; c.anchor = GridBagConstraints.CENTER; diff --git a/altosui/AltosVersion.java.in b/altosui/AltosVersion.java.in new file mode 100644 index 00000000..b0b3c0cf --- /dev/null +++ b/altosui/AltosVersion.java.in @@ -0,0 +1,22 @@ +/* + * Copyright © 2011 Keith Packard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +package altosui; + +public class AltosVersion { + public final static String version = "@VERSION@"; +} diff --git a/altosui/Makefile.am b/altosui/Makefile.am index 133afbe8..288fca0e 100644 --- a/altosui/Makefile.am +++ b/altosui/Makefile.am @@ -85,6 +85,7 @@ altosui_JAVA = \ AltosGraphTime.java \ AltosGraphUI.java \ AltosDataChooser.java \ + AltosVersion.java \ AltosVoice.java JFREECHART_CLASS= \ diff --git a/configure.ac b/configure.ac index e27cf81f..83cf9987 100644 --- a/configure.ac +++ b/configure.ac @@ -134,6 +134,7 @@ PKG_CHECK_MODULES([SNDFILE], [sndfile]) AC_OUTPUT([ Makefile altosui/Makefile +altosui/AltosVersion.java altosui/libaltos/Makefile ao-tools/Makefile ao-tools/lib/Makefile -- 2.30.2