Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mrbaseball0909

macrumors newbie
Original poster
Oct 15, 2007
10
0
So i've tried researching this for myself by doing system traces etc.. Mac Mail, iChat and other programs call a red badge when one has a new message or piece of mail.

I would like to edit the badge to a different image if possible. Only problem is i don't know where the programs are calling it from. Is it a system wide resource or part of the application contents?

I appreciate it.
 

Attachments

  • Screen shot 2010-09-03 at 5.59.05 PM.png
    Screen shot 2010-09-03 at 5.59.05 PM.png
    13 KB · Views: 110

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Each app is doing it itself. Most are probably drawing it using code in Quartz. So you won't be able to change it.
 

chown33

Moderator
Staff member
Aug 9, 2009
10,750
8,422
A sea of green
When you say "a different image", do you mean something other than a red circle? Such as "change it to a blue rectangle".

Because unless there is other evidence, there is no compelling reason to think there is an image-file stored anywhere that contains a red circle. It is entirely possible, even plausible, that the red circle is being created entirely in code. That would mean its redness and its circularity are not editable.

I know of no evidence that there is or isn't a file. Nor do I know of evidence it's done in code. Either way, it would take some significant digging into the system guts to discover evidence one way or the other.
 

mrbaseball0909

macrumors newbie
Original poster
Oct 15, 2007
10
0
When you say "a different image", do you mean something other than a red circle? Such as "change it to a blue rectangle".

Because unless there is other evidence, there is no compelling reason to think there is an image-file stored anywhere that contains a red circle. It is entirely possible, even plausible, that the red circle is being created entirely in code. That would mean its redness and its circularity are not editable.

I know of no evidence that there is or isn't a file. Nor do I know of evidence it's done in code. Either way, it would take some significant digging into the system guts to discover evidence one way or the other.

Yes i am trying to make it a coin or diamond etc..

I have found other items on the system - dragBadge, ty-badge and more that are the same exact image. i changed the drag badge file and when i drag around multiple messages in mail it displays a blue diamond instead of the red circle badge.

I have not been able to locate the file that the dock uses though to change that file.
 

foidulus

macrumors 6502a
Jan 15, 2007
904
1
You will have to set up the view yourself

From http://developer.apple.com/mac/libr...nce/NSDockTile_Class/Reference/Reference.html

If you want anything other than badge labels you have to draw the entire view yourself using an NSView. So here is a rough outline of the code:

NSView *mySuperDockTile; //Set up your view here
NSDoctkTile *tile=[[NSApplication sharedApplication] dockTile];
[tile setContentView:mySuperDockTile];

Call this whenever you change the view(add icon, remove icon etc)
[tile display];


Hope this helps.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
From http://developer.apple.com/mac/libr...nce/NSDockTile_Class/Reference/Reference.html

If you want anything other than badge labels you have to draw the entire view yourself using an NSView. So here is a rough outline of the code:

NSView *mySuperDockTile; //Set up your view here
NSDoctkTile *tile=[[NSApplication sharedApplication] dockTile];
[tile setContentView:mySuperDockTile];

Call this whenever you change the view(add icon, remove icon etc)
[tile display];


Hope this helps.

He's trying to do this system wide on apps he doesn't write/have the code for.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.