projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Allow 'c a 0' without Syntax Error
[fw/altos]
/
micropeak
/
MicroSave.java
diff --git
a/micropeak/MicroSave.java
b/micropeak/MicroSave.java
index 5088b7d7b0379769f796f07639f1cc910b3ef829..f6e2ed2a2e1743e67eb38cfcb9b7a9e2ed2ad4fb 100644
(file)
--- a/
micropeak/MicroSave.java
+++ b/
micropeak/MicroSave.java
@@
-3,7
+3,8
@@
*
* 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
*
* 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.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-24,8
+25,8
@@
import javax.swing.filechooser.FileNameExtensionFilter;
import java.io.*;
import java.util.concurrent.*;
import java.util.*;
import java.io.*;
import java.util.concurrent.*;
import java.util.*;
-import org.altusmetrum.altoslib_1.*;
-import org.altusmetrum.altosuilib_1.*;
+import org.altusmetrum.altoslib_1
4
.*;
+import org.altusmetrum.altosuilib_1
4
.*;
public class MicroSave extends JFileChooser {
public class MicroSave extends JFileChooser {
@@
-71,7
+72,7
@@
public class MicroSave extends JFileChooser {
JOptionPane.YES_NO_OPTION);
if (r != JOptionPane.YES_OPTION)
continue;
JOptionPane.YES_NO_OPTION);
if (r != JOptionPane.YES_OPTION)
continue;
-
+
if (!file.canWrite()) {
JOptionPane.showMessageDialog(frame,
String.format("\"%s\" is not writable",
if (!file.canWrite()) {
JOptionPane.showMessageDialog(frame,
String.format("\"%s\" is not writable",
@@
-83,6
+84,7
@@
public class MicroSave extends JFileChooser {
}
try {
save(file, data);
}
try {
save(file, data);
+ AltosUIPreferences.set_last_logdir(file.getParentFile());
data.set_name(filename);
return true;
} catch (FileNotFoundException fe) {
data.set_name(filename);
return true;
} catch (FileNotFoundException fe) {
@@
-101,7
+103,7
@@
public class MicroSave extends JFileChooser {
setDialogTitle("Save MicroPeak Data File");
setFileFilter(new FileNameExtensionFilter("MicroPeak data file",
"mpd"));
setDialogTitle("Save MicroPeak Data File");
setFileFilter(new FileNameExtensionFilter("MicroPeak data file",
"mpd"));
- setCurrentDirectory(AltosUIPreferences.logdir());
- setSelectedFile(MicroFile.make());
+ setCurrentDirectory(AltosUIPreferences.l
ast_l
ogdir());
+ setSelectedFile(MicroFile.make(
data
));
}
}
}
}