altosui: Add software version to Configure AltosUI dialog
authorKeith Packard <keithp@keithp.com>
Sun, 20 Mar 2011 01:43:52 +0000 (18:43 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 20 Mar 2011 01:47:55 +0000 (18:47 -0700)
Show this somewhere so we can figure out what is installed.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosui/AltosConfigureUI.java
altosui/AltosVersion.java.in [new file with mode: 0644]
altosui/Makefile.am
configure.ac

index ab3d950e0edba960c98b80563074451f0b6e151e..9a292c915b760fd51fda9b2a392665492b0363ea 100644 (file)
@@ -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 (file)
index 0000000..b0b3c0c
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright © 2011 Keith Packard <keithp@keithp.com>
+ *
+ * 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@";
+}
index 133afbe89770aa222215b793523f248534c400e4..288fca0e4c8ac4b31f9967aac8d685551327617e 100644 (file)
@@ -85,6 +85,7 @@ altosui_JAVA = \
        AltosGraphTime.java \
        AltosGraphUI.java \
        AltosDataChooser.java \
+       AltosVersion.java \
        AltosVoice.java
 
 JFREECHART_CLASS= \
index e27cf81f11462d53c0f13bb10ba93d091ef7a4e6..83cf9987df62bc471aad1fe56df3dc3f109aa3ae 100644 (file)
@@ -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