Changeset 23042
- Timestamp:
- 04/03/2008 12:53:55 PM (8 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/adium-1.2/Source/ESUserIconHandlingPlugin.m
r21653 r23042 523 523 * 524 524 * 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. 527 526 */ 528 527 - (void)menuNeedsUpdate:(NSMenu *)menu 529 528 { 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 } 532 538 NSToolbarItem *toolbarItem = [menuItem representedObject]; 533 539