[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
issues generating icon - NSImageRep immutable ?
From: |
Riccardo Mottola |
Subject: |
issues generating icon - NSImageRep immutable ? |
Date: |
Mon, 5 Jun 2023 10:25:13 +0000 |
User-agent: |
Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 SeaMonkey/2.53.16 |
Hi all, especially Fred!
I'm working with Gregory to unify the various code paths in GNUmail to
support Icon Drawing with the notification.
Currently there are three code-paths:
1) GNUstep only, which has custom controller & and iconview
2) MacOS (supported on all mac versions, but now used only 10.4):
getting the application icon, drawing on the badge, setting the icon
3) on MacOS 10.5 and up, NSDockTile and setBadgeLabel
The main distinction happens in update:.
first step, would be to remove GNUstep specific code and support
setApplicationIconImage:
The relevant code is here:
https://svn.savannah.gnu.org/viewvc/gnustep-nonfsf/apps/gnumail/Framework/GNUMail/ApplicationIconController.m?revision=881&view=markup
If I remove the ApplicationIconView code (especially in init line
301-302) thins do not draw on GNUstep.
IN essente the code boilds down to:
1) get the image through
image = [NSImage imageNamed: @"NSApplicationIcon"];
2) lock focus)
3) draw the badge stuff (but could do whatever)
4) unlock focus
5) set the application image
Debugging a little with Gregory, we came to the conclusion that the
image gotten back is not modifiable. perhaps its NSImageRep is immutable
while it should be not?
Riccardo
- issues generating icon - NSImageRep immutable ?,
Riccardo Mottola <=