summaryrefslogtreecommitdiff
path: root/altosui
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-12-08 20:34:11 -0800
committerKeith Packard <keithp@keithp.com>2013-12-08 20:34:11 -0800
commit710343a23c7e6e9c079eafdf3aeea8a40cc2ce61 (patch)
treea1247da67d8f0dfd04642afd307fc576533d6ffe /altosui
parentfd92bb8ff3be257925bf6e969d93a7f9dd941fb8 (diff)
altosui: Match directories in hex file matcher
This makes it possible to navigate around the file system Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui')
-rw-r--r--altosui/AltosFlashUI.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/altosui/AltosFlashUI.java b/altosui/AltosFlashUI.java
index 7e4cddb1..5ec5ea8a 100644
--- a/altosui/AltosFlashUI.java
+++ b/altosui/AltosFlashUI.java
@@ -192,7 +192,7 @@ public class AltosFlashUI
}
public boolean accept(File file) {
- return file.getName().startsWith(head) && file.getName().endsWith(".ihx");
+ return !file.isFile() || (file.getName().startsWith(head) && file.getName().endsWith(".ihx"));
}
public String getDescription() {
@@ -225,11 +225,8 @@ public class AltosFlashUI
if (!device.matchProduct(AltosLib.product_altusmetrum)) {
for (int i = 0; i < filters.length; i++) {
- System.out.printf ("device %s filter %d\n", device, filters[i].product);
- if (device != null && device.matchProduct(filters[i].product)) {
- System.out.printf ("select filter %s\n", filters[i].head);
+ if (device != null && device.matchProduct(filters[i].product))
hexfile_chooser.setFileFilter(filters[i]);
- }
}
}