* added lots of logging for testing
This commit is contained in:
parent
7c5b6bf891
commit
ff9529a2fe
|
@ -294,6 +294,11 @@
|
||||||
<option value="-Xdock:name=${title}" />
|
<option value="-Xdock:name=${title}" />
|
||||||
<option value="-Xdock:icon=Contents/Resources/filebot.icns" />
|
<option value="-Xdock:icon=Contents/Resources/filebot.icns" />
|
||||||
<option value="-Dapple.laf.useScreenMenuBar=true" />
|
<option value="-Dapple.laf.useScreenMenuBar=true" />
|
||||||
|
|
||||||
|
<option value="--log-file" />
|
||||||
|
<option value="../../../../filebot.log" />
|
||||||
|
<option value="--log-lock" />
|
||||||
|
<option value="false" />
|
||||||
</bundleapp>
|
</bundleapp>
|
||||||
|
|
||||||
<!-- fix code signing and submission issues -->
|
<!-- fix code signing and submission issues -->
|
||||||
|
|
|
@ -41,16 +41,21 @@ public class MacAppUtilities {
|
||||||
|
|
||||||
public static List<File> NSOpenPanel_openPanel_runModal(String title, boolean multipleMode, boolean canChooseDirectories, boolean canChooseFiles, String[] allowedFileTypes) {
|
public static List<File> NSOpenPanel_openPanel_runModal(String title, boolean multipleMode, boolean canChooseDirectories, boolean canChooseFiles, String[] allowedFileTypes) {
|
||||||
List<File> result = new ArrayList<File>();
|
List<File> result = new ArrayList<File>();
|
||||||
|
|
||||||
|
System.out.println("before dispatch_sync");
|
||||||
dispatch_sync(new Runnable() {
|
dispatch_sync(new Runnable() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
System.out.println("before NSOpenPanel");
|
||||||
Proxy peer = objc().sendProxy("NSOpenPanel", "openPanel");
|
Proxy peer = objc().sendProxy("NSOpenPanel", "openPanel");
|
||||||
peer.send("setTitle:", title);
|
peer.send("setTitle:", title);
|
||||||
peer.send("setAllowsMultipleSelection:", multipleMode ? 1 : 0);
|
peer.send("setAllowsMultipleSelection:", multipleMode ? 1 : 0);
|
||||||
|
System.out.println("before setCanChooseDirectories");
|
||||||
peer.send("setCanChooseDirectories:", canChooseDirectories ? 1 : 0);
|
peer.send("setCanChooseDirectories:", canChooseDirectories ? 1 : 0);
|
||||||
peer.send("setCanChooseFiles:", canChooseFiles ? 1 : 0);
|
peer.send("setCanChooseFiles:", canChooseFiles ? 1 : 0);
|
||||||
|
|
||||||
|
System.out.println("before NSMutableArray");
|
||||||
if (allowedFileTypes != null) {
|
if (allowedFileTypes != null) {
|
||||||
Proxy mutableArray = objc().sendProxy("NSMutableArray", "arrayWithCapacity:", allowedFileTypes.length);
|
Proxy mutableArray = objc().sendProxy("NSMutableArray", "arrayWithCapacity:", allowedFileTypes.length);
|
||||||
for (String type : allowedFileTypes) {
|
for (String type : allowedFileTypes) {
|
||||||
|
@ -59,9 +64,12 @@ public class MacAppUtilities {
|
||||||
peer.send("setAllowedFileTypes:", mutableArray);
|
peer.send("setAllowedFileTypes:", mutableArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
System.out.println("before runModal");
|
||||||
if (peer.sendInt("runModal") != 0) {
|
if (peer.sendInt("runModal") != 0) {
|
||||||
|
System.out.println("before dispatch_sync");
|
||||||
Proxy nsArray = peer.getProxy("URLs");
|
Proxy nsArray = peer.getProxy("URLs");
|
||||||
int size = nsArray.sendInt("count");
|
int size = nsArray.sendInt("count");
|
||||||
|
System.out.println("before dispatch_sync");
|
||||||
for (int i = 0; i < size; i++) {
|
for (int i = 0; i < size; i++) {
|
||||||
Proxy url = nsArray.sendProxy("objectAtIndex:", i);
|
Proxy url = nsArray.sendProxy("objectAtIndex:", i);
|
||||||
String path = url.sendString("path");
|
String path = url.sendString("path");
|
||||||
|
@ -70,6 +78,8 @@ public class MacAppUtilities {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
System.out.println("after dispatch_sync");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue