Added: Window icons for various dialogs including save/open/export/import

This commit is contained in:
Jindra Petřík
2024-08-05 11:17:25 +02:00
parent 58f207054d
commit 4410e4b95f
12 changed files with 66 additions and 40 deletions
+5 -3
View File
@@ -1997,8 +1997,7 @@ public class Main {
}
public static boolean saveFileDialog(Openable openable, final SaveFileMode mode) {
JFileChooser fc = new JFileChooser();
fc.setCurrentDirectory(new File(Configuration.lastSaveDir.get()));
String ext = ".swf";
switch (mode) {
case SAVE:
@@ -2011,6 +2010,9 @@ public class Main {
ext = ".exe";
break;
}
JFileChooser fc = View.getFileChooserWithIcon(mode == SaveFileMode.EXE ? "saveasexe" : "saveas");
fc.setCurrentDirectory(new File(Configuration.lastSaveDir.get()));
FileFilter swfFilter = new FileFilter() {
@Override
@@ -2175,7 +2177,7 @@ public class Main {
public static boolean openFileDialog() {
View.checkAccess();
JFileChooser fc = new JFileChooser();
JFileChooser fc = View.getFileChooserWithIcon("open");
if (Configuration.openMultipleFiles.get()) {
fc.setMultiSelectionEnabled(true);
}