[7u6] Review request for 7179349: [macosx] Java processes on Mac should not use default Apple icon

Anthony Petrov anthony.petrov at oracle.com
Mon Jun 25 12:58:06 PDT 2012


This version of the fix looks fine to me. Thanks.

--
best regards,
Anthony

On 6/25/2012 7:15 PM, Leonid Romanov wrote:
> Here is an update webrev that incorporate your suggestion and has the 
> icon file:
> http://cr.openjdk.java.net/~leonidr/7179349/webrev.01/
> 
> On 25.06.2012, at 18:08, Anthony Petrov wrote:
> 
>> Hi Leonid,
>>
>> Where does the JavaApp.icns file come from? I can't see it in the webrev.
>>
>> src/macosx/native/sun/osxapp/NSApplicationAWT.m
>>> 269     NSString* bundleIcon = [[NSBundle mainBundle] 
>>> objectForInfoDictionaryKey:@"CFBundleIconFile"];
>>> 270     if (bundleIcon == nil && iconImage == nil) {
>>
>> We could probably rewrite this as:
>>
>> if (iconImage == nil) {
>>   NSString *bundleIcon...
>>   if (bundleIcon == nil) {
>>      ...
>>
>> to avoid accessing the bundle when it is unneeded.
>>
>> The fix looks good otherwise.
>>
>> --
>> best regards,
>> Anthony
>>
>> On 06/24/12 22:33, Leonid Romanov wrote:
>>> Hi,
>>> Please review a fix for 7179349: [macosx] Java processes on Mac 
>>> should not use default Apple icon.
>>> Currently, OpenJDK uses Apple supplied icon found in 
>>> /System/Library/Frameworks/JavaVM.framework as the default icon for 
>>> Java apps. This fix makes it use an icon that comes with OpenJDK instead.
>>> We do it by converting the icon file to an .h file which contains the 
>>> icon data as an array of bytes  and then including the .h file where 
>>> the icon data is needed. So, we basically compile in the icon data 
>>> into the binaries. Such approach was chosen because this is what we 
>>> do on other platforms (Linux, Windows) and because it is the easiest 
>>> way to access the icon data during runtime.
>>>
>>> Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7179349
>>> Webrev:  http://cr.openjdk.java.net/~leonidr/7179349/webrev.00/
>>>
>>> Note: this is a freshly filled bug, so my understanding is it may 
>>> take a while until it becomes visible via bug's link above.
>>>
>>> Thanks,
>>> Leonid.
>>>
>>>
> 


More information about the macosx-port-dev mailing list