mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-24 00:38:52 -05:00
* fix mas config
This commit is contained in:
parent
7d49fa2317
commit
c711e4543c
@ -279,7 +279,7 @@
|
||||
<option value="-Dapplication.cache=./Library/Caches/ehcache.disk.store" />
|
||||
<option value="-Djava.io.tmpdir=./Library/Caches/java.io.tmpdir" />
|
||||
|
||||
<option value="-Dnet.filebot.UserFiles.useNative=true" />
|
||||
<option value="-Dnet.filebot.UserFiles.fileChooser=AWT" />
|
||||
|
||||
<option value="-Dapplication.deployment=mas" />
|
||||
<option value="-Dapplication.update=skip" />
|
||||
|
@ -68,7 +68,8 @@ public final class Settings {
|
||||
}
|
||||
|
||||
public static FileChooser getPreferredFileChooser() {
|
||||
return FileChooser.valueOf(System.getProperty("net.filebot.UserFiles.fileChooser", FileChooser.Swing.name()));
|
||||
String prop = System.getProperty("net.filebot.UserFiles.fileChooser");
|
||||
return prop == null ? FileChooser.Swing : FileChooser.valueOf(prop);
|
||||
}
|
||||
|
||||
public static int getPreferredThreadPoolSize() {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.filebot;
|
||||
|
||||
import static java.util.Arrays.*;
|
||||
import static java.util.Collections.*;
|
||||
import static net.filebot.Settings.*;
|
||||
import static net.filebot.util.ui.SwingUI.*;
|
||||
|
||||
@ -148,48 +147,6 @@ public class UserFiles {
|
||||
Frame[] frames = Frame.getFrames();
|
||||
return new FileDialog(frames.length > 0 ? frames[0] : null, title, mode);
|
||||
}
|
||||
},
|
||||
|
||||
JavaFX {
|
||||
@Override
|
||||
public List<File> showLoadDialogSelectFiles(boolean folderMode, boolean multiSelection, File defaultFile, ExtensionFileFilter filter, String title, Object parent) {
|
||||
javafx.stage.FileChooser fileChooser = new javafx.stage.FileChooser();
|
||||
fileChooser.setTitle(title);
|
||||
// fileChooser.getExtensionFilters().add(new javafx.stage.FileChooser.ExtensionFilter(arg0, arg1))
|
||||
|
||||
if (defaultFile != null) {
|
||||
if (defaultFile.getParentFile() != null) {
|
||||
fileChooser.setInitialDirectory(defaultFile.getParentFile());
|
||||
}
|
||||
fileChooser.setInitialFileName(defaultFile.getName());
|
||||
}
|
||||
|
||||
if (multiSelection) {
|
||||
List<File> files = fileChooser.showOpenMultipleDialog(null);
|
||||
if (files != null)
|
||||
return files;
|
||||
} else {
|
||||
File file = fileChooser.showOpenDialog(null);
|
||||
if (file != null)
|
||||
return singletonList(file);
|
||||
}
|
||||
return emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public File showSaveDialogSelectFile(boolean folderMode, File defaultFile, String title, Object parent) {
|
||||
javafx.stage.FileChooser fileChooser = new javafx.stage.FileChooser();
|
||||
fileChooser.setTitle(title);
|
||||
|
||||
if (defaultFile != null) {
|
||||
if (defaultFile.getParentFile() != null) {
|
||||
fileChooser.setInitialDirectory(defaultFile.getParentFile());
|
||||
}
|
||||
fileChooser.setInitialFileName(defaultFile.getName());
|
||||
}
|
||||
|
||||
return fileChooser.showSaveDialog(null);
|
||||
}
|
||||
};
|
||||
|
||||
public abstract List<File> showLoadDialogSelectFiles(boolean folderMode, boolean multiSelection, File defaultFile, ExtensionFileFilter filter, String title, Object parent);
|
||||
|
Loading…
Reference in New Issue
Block a user