changeset 5425:8f37aad76b5b

7159381: [macosx] Dock Icon defaults to Generic Java Application Category Reviewed-by: skovatch, art
author leonidr
date Fri, 22 Jun 2012 15:22:28 +0400
parents b521e3a5b843
children 002ca3d97d19
files src/macosx/native/sun/osxapp/NSApplicationAWT.h src/macosx/native/sun/osxapp/NSApplicationAWT.m
diffstat 2 files changed, 1 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/macosx/native/sun/osxapp/NSApplicationAWT.h	Fri Jun 22 14:06:40 2012 +0400
+++ b/src/macosx/native/sun/osxapp/NSApplicationAWT.h	Fri Jun 22 15:22:28 2012 +0400
@@ -28,7 +28,6 @@
 
 @interface NSApplicationAWT : NSApplication {
     NSString *fApplicationName;
-    BOOL fUseDefaultIcon;
     NSWindow *eventTransparentWindow;
     NSTimeInterval dummyEventTimestamp;
     NSConditionLock* seenDummyEventLock;
--- a/src/macosx/native/sun/osxapp/NSApplicationAWT.m	Fri Jun 22 14:06:40 2012 +0400
+++ b/src/macosx/native/sun/osxapp/NSApplicationAWT.m	Fri Jun 22 15:22:28 2012 +0400
@@ -51,7 +51,6 @@
 
 AWT_ASSERT_APPKIT_THREAD;
     fApplicationName = nil;
-    fUseDefaultIcon = NO;
     dummyEventTimestamp = 0.0;
     seenDummyEventLock = nil;
 
@@ -148,10 +147,6 @@
     if (appName != NULL) {
         fApplicationName = [NSString stringWithUTF8String:appName];
         unsetenv(envVar);
-
-        // If this environment variable was set we were launched from the command line, so we
-        // should use a generic app icon if one wasn't set.
-        fUseDefaultIcon = YES;
     }
 
     // If it wasn't specified as an argument, see if it was specified as a system property.
@@ -173,9 +168,6 @@
             if (lastPeriod.location != NSNotFound) {
                 fApplicationName = [fApplicationName substringFromIndex:lastPeriod.location + 1];
             }
-            // If this environment variable was set we were launched from the command line, so we
-            // should use a generic app icon if one wasn't set.
-            fUseDefaultIcon = YES;
         }
     }
 
@@ -268,7 +260,7 @@
     // If the icon file wasn't specified as an argument and we need to get an icon
     // we'll use the generic java app icon.
     NSString *defaultIconPath = [NSString stringWithFormat:@"%@%@", SHARED_FRAMEWORK_BUNDLE, @"/Resources/GenericApp.icns"];
-    if (fUseDefaultIcon && (theIconPath == nil)) {
+    if (([NSApp applicationIconImage] == nil) && (theIconPath == nil)) {
         theIconPath = defaultIconPath;
     }