brettpoole / growl

Automatically exported from code.google.com/p/growl
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Incorrect icon being used for notifications posted to NC in 10.8 #519

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  Happens in Growl 2.0beta 3 SDK on Mountain Lion.  Growl 1.2.2 installed but 
not running, so Growl SDK uses notification center.  NOTE: the issue ONLY 
happens when Growl SDK posts to NC.

2.  Invoke a notification like:

    NSImage *growlImg = [NSImage imageNamed:@"icons.icns"];
    NSData *growlImgData = [NSData dataWithData:[growlImg TIFFRepresentation]];

    [GrowlApplicationBridge notifyWithTitle:title
                                description:nil
                           notificationName:notificationType
                                   iconData:growlImgData
                                   priority:0 /* how high of priority the alert is, 0 is default */
                                   isSticky:NO /* indicates if we want the alert to stay on screen till clicked */
                               clickContext:nil]; /* click context is the method we want called when the alert is clicked, nil for none */

3. The icon used for the msg shown by NC will be incorrect; i.e., it's not the 
icon being passed to imgData.  It's using another data from another image, 
which is in the memory space of the program, but not what was passed as 
"growlImgData".  It's really strange.

What is the expected output?

The correct icon :)

Again, when Growl is running, then the SDK does things correctly.  This is only 
an issue when the framework posts to NC in 10.8.

Original issue reported on code.google.com by vishal.k...@gmail.com on 7 Aug 2012 at 11:45

GoogleCodeExporter commented 8 years ago
Is the icon that is showing up your app icon?

Original comment by ch...@growl.info on 8 Aug 2012 at 12:45

GoogleCodeExporter commented 8 years ago
No, that's actually what I'm trying to set it to now ("icons.icns").  The image 
is another NSImage created and used in a completely different part of the 
program.

Original comment by vishal.k...@gmail.com on 8 Aug 2012 at 1:07

GoogleCodeExporter commented 8 years ago
At the time that happens, is the the image of the running process that is 
notifying NC?

Original comment by ch...@growl.info on 8 Aug 2012 at 1:17

GoogleCodeExporter commented 8 years ago
No, it's not.  It is, however, constructed based on the app icon of another 
running application on the system.

Original comment by vishal.k...@gmail.com on 8 Aug 2012 at 1:42

GoogleCodeExporter commented 8 years ago
So as far as we're aware, NC will only display the image of the icon of the 
process that is running. So for instance if it's Adium, you'd see the Adium 
duck. For Growl, you'd see the Growl claw, etc etc.

Does that help at all here?

Original comment by ch...@growl.info on 8 Aug 2012 at 1:45

GoogleCodeExporter commented 8 years ago
I implemented NC support independent of the Growl SDK and the problem still 
reproduces, so it's likely a bug in Mac OS.  It looks to be some caching of 
application icons that's gone wrong.

So this can be closed as not a Growl bug.

Original comment by vishal.k...@gmail.com on 8 Aug 2012 at 3:19

GoogleCodeExporter commented 8 years ago
Closing as invalid (valid bug, but not ours, it needs to be filed in radar with 
Apple).

Original comment by dan...@growl.info on 8 Aug 2012 at 7:29