Disable dock icon but keep menu icon

Discussion in 'Mac Programming' started by doobs, Apr 20, 2009.

  1. doobs macrumors regular

    Joined:
    Jul 19, 2008
    #1
    I have an application (Tweetie) that has a dock icon and a menu bar icon. If I put
    Code:
    <key>LSUIElement</key>
    <true/> 
    after <dict> in the info.plist file for the application, then both the dock and menu bar icons disappear. Does anyone know of a way to disable only the dock icon while keeping the the menu bar icon visible? Thanks in advance...
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    AFAIK, there isn't a way to do this. You either show both Dock and menu bar, or neither and use an NSStatusItem.
     
  3. Wowzera macrumors 6502a

    Joined:
    Oct 14, 2008
    Location:
    Brazil
    #3
    You are wrong, lot of programs just keep in MenuBar, like InsomniaX - iStat and such.
     
  4. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #4
    That's what NSStatusItem is. It's the menu item that shows in the menu bar on the right side. Usually apps show this only, or they have a normal Dock icon and menu bar, but not both.

    LSUIElement shouldn't hide the NSStatusItem. If it is then something else is going on in the code.

    Edit: I tested this using Tweetie although I don't have a Twitter account. The first time it didn't show, but the second time it did, so maybe just try relaunching the app again.
     
  5. Wowzera macrumors 6502a

    Joined:
    Oct 14, 2008
    Location:
    Brazil
    #5
    What about Bowtie ? You can see either both, only one or neither. I am not pro on programming, so anyone else can confirm this.
    Sorry if I looked to be rude.
     

Share This Page