summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8ade7d9)
With Tm/Tn not having GPS to get the current date, it's no longer
unusual to have no date for a flight log, so don't show the 0000-00-00
piece in that case.
Signed-off-by: Keith Packard <keithp@keithp.com>
public AltosEepromItem(AltosEepromLog in_log) {
log = in_log;
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);
download = new JCheckBox("", log.download);
download.addActionListener(this);