7124250: [macosx] JOptionPane dialogs show wrong icons
authorpchelko
Thu, 24 Apr 2014 20:22:58 +0400
changeset 24533 7c429f6f88d2
parent 24532 24831bd48764
child 24534 07cf38b730b5
7124250: [macosx] JOptionPane dialogs show wrong icons Reviewed-by: serb, leonidr
jdk/src/macosx/classes/com/apple/laf/AquaImageFactory.java
--- a/jdk/src/macosx/classes/com/apple/laf/AquaImageFactory.java	Thu Apr 24 16:15:08 2014 +0400
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaImageFactory.java	Thu Apr 24 20:22:58 2014 +0400
@@ -55,7 +55,7 @@
 
         return new IconUIResource(new AquaIcon.CachingScalingIcon(kAlertIconSize, kAlertIconSize) {
             Image createImage() {
-                return getThisApplicationsIcon(kAlertIconSize, kAlertIconSize);
+                return getGenericJavaIcon();
             }
         });
     }
@@ -81,24 +81,6 @@
         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<Image>() {
             public Image run() {
@@ -142,7 +124,7 @@
         final Icon smallAppIconScaled = new AquaIcon.CachingScalingIcon(
                 kAlertSubIconSize, kAlertSubIconSize) {
                     Image createImage() {
-                        return getThisApplicationsIcon(kAlertSubIconSize, kAlertSubIconSize);
+                        return getGenericJavaIcon();
                     }
                 };
 
@@ -514,4 +496,4 @@
     public static Color getSelectionInactiveForegroundColorUIResource() {
         return new SystemColorProxy(LWCToolkit.getAppleColor(LWCToolkit.INACTIVE_SELECTION_FOREGROUND_COLOR));
     }
-}
\ No newline at end of file
+}