Developers and Programming i need your assistance.

Discussion in 'Mac Programming' started by mrbaseball0909, Sep 3, 2010.

  1. macrumors newbie

    Joined:
    Oct 15, 2007
    #1
    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.
     

    Attached Files:

  2. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    Each app is doing it itself. Most are probably drawing it using code in Quartz. So you won't be able to change it.
     
  3. macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
  4. thread starter macrumors newbie

    Joined:
    Oct 15, 2007
    #4
  5. macrumors 603

    Joined:
    Aug 9, 2009
    #5
    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.
     
  6. thread starter macrumors newbie

    Joined:
    Oct 15, 2007
    #6
    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.
     
  7. macrumors 6502a

    Joined:
    Jan 15, 2007
    #7
    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.
     
  8. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #8
    He's trying to do this system wide on apps he doesn't write/have the code for.
     

Share This Page