altosui: Show only supported telemetry version
[fw/altos] / altosui / AltosEepromSelect.java
index cb71524d48dad38d04b4d7ef573c6f4c2a6c747b..ebafc4c87da3382f3f670035aea39a3bbc6f9f88 100644 (file)
@@ -45,8 +45,14 @@ class AltosEepromItem implements ActionListener {
        public AltosEepromItem(AltosEepromLog in_log) {
                log = in_log;
 
-               label = new JLabel(String.format("Flight #%02d - %04d-%02d-%02d",
-                                                log.flight, log.year, log.month, log.day));
+               String  text;
+               if (log.year != 0)
+                       text = String.format("Flight #%02d - %04d-%02d-%02d",
+                                            log.flight, log.year, log.month, log.day);
+               else
+                       text = String.format("Flight #%02d", log.flight);
+
+               label = new JLabel(text);
 
                download = new JCheckBox("", log.download);
                download.addActionListener(this);
@@ -56,7 +62,7 @@ class AltosEepromItem implements ActionListener {
        }
 }
 
-public class AltosEepromSelect extends JDialog implements ActionListener {
+public class AltosEepromSelect extends AltosDialog implements ActionListener {
        private JList                   list;
        private JFrame                  frame;
        JButton                         ok;