Adium

Changeset 23042

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

Merged [23041]: Fixed the text-only user icon toolbar item on 10.5. Fixes #8518

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/adium-1.2/Source/ESUserIconHandlingPlugin.m

    r21653 r23042  
    523523 * 
    524524 * Should only be called for a menu off one of our toolbar items in text-only mode, and only when that menu is about 
    525  * to be displayed. The menu should have two items. The first is added by the system; the second has no title and is 
    526  * our menu item for showing the image. 
     525 * to be displayed. 
    527526 */ 
    528527- (void)menuNeedsUpdate:(NSMenu *)menu 
    529528{ 
    530         //The first item is a root item inserted by the system. The second item is the single item 
    531         NSMenuItem              *menuItem = [menu itemAtIndex:1]; 
     529        NSMenuItem              *menuItem; 
     530        if ([NSApp isOnLeopardOrBetter]) { 
     531                menuItem = [menu itemAtIndex:0]; 
     532        } else { 
     533                /* On 10.4, the menu should have two items. The first is added by the system; the second has no title and is 
     534                 * our menu item for showing the image. Leopard fixed this silliness. 
     535                 */ 
     536                 menuItem = [menu itemAtIndex:1]; 
     537        } 
    532538        NSToolbarItem   *toolbarItem = [menuItem representedObject]; 
    533539