Changeset 23041
- Timestamp:
- 04/03/2008 12:53:32 PM (8 months ago)
- Files:
-
- trunk/Source/ESUserIconHandlingPlugin.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Source/ESUserIconHandlingPlugin.m
r22634 r23041 319 319 * 320 320 * 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. 323 322 */ 324 323 - (void)menuNeedsUpdate:(NSMenu *)menu 325 324 { 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 } 328 334 NSToolbarItem *toolbarItem = [menuItem representedObject]; 329 335