projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Clean up trailing whitespace in ao_pad.c
[fw/altos]
/
altosui
/
AltosEepromManage.java
diff --git
a/altosui/AltosEepromManage.java
b/altosui/AltosEepromManage.java
index cc9adb0c4c504f334fdc1f76629b312cca4ebae6..e363557141547dc0d92f46719b924ee010ec7c57 100644
(file)
--- a/
altosui/AltosEepromManage.java
+++ b/
altosui/AltosEepromManage.java
@@
-21,8
+21,8
@@
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
import java.util.concurrent.*;
import javax.swing.*;
import java.io.*;
import java.util.concurrent.*;
-import org.altusmetrum.
AltosLib
.*;
-import org.altusmetrum.altosuilib.*;
+import org.altusmetrum.
altoslib_3
.*;
+import org.altusmetrum.altosuilib
_1
.*;
public class AltosEepromManage implements ActionListener {
public class AltosEepromManage implements ActionListener {
@@
-45,6
+45,15
@@
public class AltosEepromManage implements ActionListener {
}
}
}
}
+ private int countDeletedFlights() {
+ int count = 0;
+ for (AltosEepromLog flight : flights) {
+ if (flight.selected)
+ count++;
+ }
+ return count;
+ }
+
private String showDeletedFlights() {
String result = "";
private String showDeletedFlights() {
String result = "";
@@
-94,7
+103,8
@@
public class AltosEepromManage implements ActionListener {
} else if (cmd.equals("delete")) {
if (success) {
JOptionPane.showMessageDialog(frame,
} else if (cmd.equals("delete")) {
if (success) {
JOptionPane.showMessageDialog(frame,
- String.format("Flights erased: %s",
+ String.format("%d flights erased: %s",
+ countDeletedFlights(),
showDeletedFlights()),
serial_line.device.toShortString(),
JOptionPane.INFORMATION_MESSAGE);
showDeletedFlights()),
serial_line.device.toShortString(),
JOptionPane.INFORMATION_MESSAGE);
@@
-123,11
+133,13
@@
public class AltosEepromManage implements ActionListener {
for (AltosEepromLog flight : flights)
any_selected = any_selected || flight.selected;
if (any_selected) {
for (AltosEepromLog flight : flights)
any_selected = any_selected || flight.selected;
if (any_selected) {
- download = new AltosEepromDownload(frame,
+ AltosEepromMonitorUI monitor = new AltosEepromMonitorUI(frame);
+ monitor.addActionListener(this);
+ serial_line.set_frame(frame);
+ download = new AltosEepromDownload(monitor,
serial_line,
remote,
flights);
serial_line,
remote,
flights);
- download.addActionListener(this);
/*
* Start flight log download
*/
/*
* Start flight log download
*/