Adium

Changeset 23041

Show
Ignore:
Timestamp:
04/03/2008 12:53:32 PM (8 months ago)
Author:
evands
Message:

Fixed the text-only user icon toolbar item on 10.5. Fixes #8518

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Source/ESUserIconHandlingPlugin.m

    r22634 r23041  
    319319 * 
    320320 * Should only be called for a menu off one of our toolbar items in text-only mode, and only when that menu is about 
    321  * to be displayed. The menu should have two items. The first is added by the system; the second has no title and is 
    322  * our menu item for showing the image. 
     321 * to be displayed. 
    323322 */ 
    324323- (void)menuNeedsUpdate:(NSMenu *)menu 
    325324{ 
    326         //The first item is a root item inserted by the system. The second item is the single item 
    327         NSMenuItem              *menuItem = [menu itemAtIndex:1]; 
     325        NSMenuItem              *menuItem; 
     326        if ([NSApp isOnLeopardOrBetter]) { 
     327                menuItem = [menu itemAtIndex:0]; 
     328        } else { 
     329                /* On 10.4, the menu should have two items. The first is added by the system; the second has no title and is 
     330                 * our menu item for showing the image. Leopard fixed this silliness. 
     331                 */ 
     332                 menuItem = [menu itemAtIndex:1]; 
     333        } 
    328334        NSToolbarItem   *toolbarItem = [menuItem representedObject]; 
    329335