mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-23 00:08:51 -05:00
Fix JDK8 build
This commit is contained in:
parent
66f8309a24
commit
8a5f65d874
58
jdk8.patch
58
jdk8.patch
@ -392,15 +392,10 @@ index 6b482847..1d21eca0 100644
|
|||||||
model.stream().filter(f -> isLockedFolder(f)).findFirst().ifPresent(f -> {
|
model.stream().filter(f -> isLockedFolder(f)).findFirst().ifPresent(f -> {
|
||||||
invokeLater(250, () -> {
|
invokeLater(250, () -> {
|
||||||
diff --git a/source/net/filebot/platform/mac/MacAppUtilities.java b/source/net/filebot/platform/mac/MacAppUtilities.java
|
diff --git a/source/net/filebot/platform/mac/MacAppUtilities.java b/source/net/filebot/platform/mac/MacAppUtilities.java
|
||||||
index 71ac7462..c8bf1713 100644
|
index 71ac7462..9f099afd 100644
|
||||||
--- a/source/net/filebot/platform/mac/MacAppUtilities.java
|
--- a/source/net/filebot/platform/mac/MacAppUtilities.java
|
||||||
+++ b/source/net/filebot/platform/mac/MacAppUtilities.java
|
+++ b/source/net/filebot/platform/mac/MacAppUtilities.java
|
||||||
@@ -2,12 +2,10 @@ package net.filebot.platform.mac;
|
@@ -7,7 +7,6 @@ import java.awt.EventQueue;
|
||||||
|
|
||||||
import static ca.weblite.objc.util.CocoaUtils.*;
|
|
||||||
|
|
||||||
-import java.awt.Desktop;
|
|
||||||
import java.awt.EventQueue;
|
|
||||||
import java.awt.SecondaryLoop;
|
import java.awt.SecondaryLoop;
|
||||||
import java.awt.Toolkit;
|
import java.awt.Toolkit;
|
||||||
import java.awt.Window;
|
import java.awt.Window;
|
||||||
@ -408,11 +403,10 @@ index 71ac7462..c8bf1713 100644
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@@ -96,43 +94,6 @@ public class MacAppUtilities {
|
@@ -97,20 +96,6 @@ public class MacAppUtilities {
|
||||||
public static void initializeApplication(JMenuBar appMenuBar, Consumer<List<File>> openFileHandler) {
|
|
||||||
// improved UI defaults
|
// improved UI defaults
|
||||||
UIManager.put("TitledBorder.border", UIManager.getBorder("InsetBorder.aquaVariant"));
|
UIManager.put("TitledBorder.border", UIManager.getBorder("InsetBorder.aquaVariant"));
|
||||||
-
|
|
||||||
- // make sure Application Quit Events get forwarded to normal Window Listeners
|
- // make sure Application Quit Events get forwarded to normal Window Listeners
|
||||||
- Desktop.getDesktop().setQuitStrategy(QuitStrategy.CLOSE_ALL_WINDOWS);
|
- Desktop.getDesktop().setQuitStrategy(QuitStrategy.CLOSE_ALL_WINDOWS);
|
||||||
-
|
-
|
||||||
@ -427,31 +421,9 @@ index 71ac7462..c8bf1713 100644
|
|||||||
- }
|
- }
|
||||||
- });
|
- });
|
||||||
-
|
-
|
||||||
- // add workflow service menu
|
// add workflow service menu
|
||||||
- initializeWorkflowServiceMenu(appMenuBar.getMenu(0));
|
initializeWorkflowServiceMenu(appMenuBar.getMenu(0));
|
||||||
- }
|
|
||||||
-
|
|
||||||
- public static void initializeWorkflowServiceMenu(JMenu menu) {
|
|
||||||
- String root = System.getProperty("apple.app.workflows");
|
|
||||||
- String home = System.getProperty("user.home");
|
|
||||||
-
|
|
||||||
- if (root == null) {
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- menu.addSeparator();
|
|
||||||
-
|
|
||||||
- for (WorkflowType type : WorkflowType.values()) {
|
|
||||||
- File templateFolder = new File(root, type.getFolderName());
|
|
||||||
- File targetFolder = new File(home, type.getLibraryPath());
|
|
||||||
-
|
|
||||||
- if (templateFolder.exists()) {
|
|
||||||
- menu.add(new WorkflowMenu(type.getFolderName(), templateFolder, targetFolder));
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isLockedFolder(File folder) {
|
|
||||||
diff --git a/source/net/filebot/platform/mac/xattr/XAttrUtil.java b/source/net/filebot/platform/mac/xattr/XAttrUtil.java
|
diff --git a/source/net/filebot/platform/mac/xattr/XAttrUtil.java b/source/net/filebot/platform/mac/xattr/XAttrUtil.java
|
||||||
index 53eb62d9..ad02288e 100644
|
index 53eb62d9..ad02288e 100644
|
||||||
--- a/source/net/filebot/platform/mac/xattr/XAttrUtil.java
|
--- a/source/net/filebot/platform/mac/xattr/XAttrUtil.java
|
||||||
@ -513,3 +485,21 @@ index ffae21d8..414e9c0d 100644
|
|||||||
|
|
||||||
Rectangle2D r = p1.createUnion(p2);
|
Rectangle2D r = p1.createUnion(p2);
|
||||||
double w = r.getWidth() + 1;
|
double w = r.getWidth() + 1;
|
||||||
|
diff --git a/source/net/filebot/util/ui/SwingUI.java b/source/net/filebot/util/ui/SwingUI.java
|
||||||
|
index ace025fc..34bde934 100644
|
||||||
|
--- a/source/net/filebot/util/ui/SwingUI.java
|
||||||
|
+++ b/source/net/filebot/util/ui/SwingUI.java
|
||||||
|
@@ -437,11 +437,9 @@ public final class SwingUI {
|
||||||
|
Desktop.getDesktop().open(file);
|
||||||
|
break;
|
||||||
|
case REVEAL:
|
||||||
|
- Desktop.getDesktop().browseFileDirectory(file);
|
||||||
|
- break;
|
||||||
|
+ throw new UnsupportedOperationException();
|
||||||
|
case TRASH:
|
||||||
|
- Desktop.getDesktop().moveToTrash(file);
|
||||||
|
- break;
|
||||||
|
+ throw new UnsupportedOperationException();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.log(Level.SEVERE, e, cause(verb, e));
|
||||||
|
Loading…
Reference in New Issue
Block a user