mirror of
https://github.com/mitb-archive/filebot
synced 2025-01-11 22:08:01 -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="-Dapplication.cache=./Library/Caches/ehcache.disk.store" />
|
||||||
<option value="-Djava.io.tmpdir=./Library/Caches/java.io.tmpdir" />
|
<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.deployment=mas" />
|
||||||
<option value="-Dapplication.update=skip" />
|
<option value="-Dapplication.update=skip" />
|
||||||
|
@ -68,7 +68,8 @@ public final class Settings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static FileChooser getPreferredFileChooser() {
|
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() {
|
public static int getPreferredThreadPoolSize() {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package net.filebot;
|
package net.filebot;
|
||||||
|
|
||||||
import static java.util.Arrays.*;
|
import static java.util.Arrays.*;
|
||||||
import static java.util.Collections.*;
|
|
||||||
import static net.filebot.Settings.*;
|
import static net.filebot.Settings.*;
|
||||||
import static net.filebot.util.ui.SwingUI.*;
|
import static net.filebot.util.ui.SwingUI.*;
|
||||||
|
|
||||||
@ -148,48 +147,6 @@ public class UserFiles {
|
|||||||
Frame[] frames = Frame.getFrames();
|
Frame[] frames = Frame.getFrames();
|
||||||
return new FileDialog(frames.length > 0 ? frames[0] : null, title, mode);
|
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);
|
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