- (id)_menuImpl;
@end
+extern void _NSGetMenuItemForCommandKeyEvent (NSMenu *menu, void *chicken, void *taco, void *food);
extern MenuRef _NSGetCarbonMenu( NSMenu *menu);
@implementation NSMenu (ITCategory)
- (void)indentItemAtIndex:(int)index toLevel:(int)indentLevel {
MenuRef carbonMenu = [self menuRef];
-
if (carbonMenu) {
- SetMenuItemIndent(carbonMenu, index, indentLevel);
+ SetMenuItemIndent(carbonMenu, index + 1, indentLevel);
}
}
- (MenuRef)menuRef {
MenuRef carbonMenu;
+ int w00t, m00f;
if( [self respondsToSelector:@selector(_menuImpl)] ) {
[self _menuImpl];
return nil;
}
+ _NSGetMenuItemForCommandKeyEvent(self, NULL, &w00t, &m00f);
carbonMenu = _NSGetCarbonMenu(self);
return carbonMenu;
}