From 8605ab730f2302f5b378d922b0d4cdf08a18020c Mon Sep 17 00:00:00 2001 From: pchelko Date: Thu, 24 Apr 2014 20:22:58 +0400 Subject: 7124250: [macosx] JOptionPane dialogs show wrong icons Reviewed-by: serb, leonidr --- .../classes/com/apple/laf/AquaImageFactory.java | 24 +++------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/src/macosx/classes/com/apple/laf/AquaImageFactory.java b/src/macosx/classes/com/apple/laf/AquaImageFactory.java index 0f4d0b533..8fbc4c01a 100644 --- a/src/macosx/classes/com/apple/laf/AquaImageFactory.java +++ b/src/macosx/classes/com/apple/laf/AquaImageFactory.java @@ -57,7 +57,7 @@ public class AquaImageFactory { return new IconUIResource(new AquaIcon.CachingScalingIcon(kAlertIconSize, kAlertIconSize) { Image createImage() { - return getThisApplicationsIcon(kAlertIconSize, kAlertIconSize); + return getGenericJavaIcon(); } }); } @@ -83,24 +83,6 @@ public class AquaImageFactory { return getAppIconCompositedOn(lockIcon); } - static Image getThisApplicationsIcon(final int width, final int height) { - final String path = getPathToThisApplication(); - - if (path == null) { - return getGenericJavaIcon(); - } - - if (path.endsWith("/Home/bin")) { - return getGenericJavaIcon(); - } - - if (path.startsWith("/usr/bin")) { - return getGenericJavaIcon(); - } - - return AquaUtils.getCImageCreator().createImageOfFile(path, height, width); - } - static Image getGenericJavaIcon() { return java.security.AccessController.doPrivileged(new PrivilegedAction() { public Image run() { @@ -144,7 +126,7 @@ public class AquaImageFactory { final Icon smallAppIconScaled = new AquaIcon.CachingScalingIcon( kAlertSubIconSize, kAlertSubIconSize) { Image createImage() { - return getThisApplicationsIcon(kAlertSubIconSize, kAlertSubIconSize); + return getGenericJavaIcon(); } }; @@ -528,4 +510,4 @@ public class AquaImageFactory { public static Color getSelectionInactiveForegroundColorUIResource() { return new SystemColorProxy(LWCToolkit.getAppleColor(LWCToolkit.INACTIVE_SELECTION_FOREGROUND_COLOR)); } -} \ No newline at end of file +} -- cgit v1.2.3