Camino only - Bug 358577: Remove use of NSMenuItem protocol. Patch by smorgan <stuart.morgan@alumni.case.edu> r=me sr=pink.

This commit is contained in:
stridey%gmail.com 2006-10-30 15:35:26 +00:00
parent 28f21d8213
commit 9101992e7e
7 changed files with 12 additions and 12 deletions

View File

@ -1643,7 +1643,7 @@ static const unsigned int TableViewSolidVerticalGridLineMask = 1;
}
}
- (BOOL)validateMenuItem:(id <NSMenuItem>)menuItem
- (BOOL)validateMenuItem:(NSMenuItem*)menuItem
{
SEL action = [menuItem action];

View File

@ -74,7 +74,7 @@
- (void)insertItemWithTitle:(NSString *)itemTitle atIndex:(int)index
{
id<NSMenuItem> aMenuItem;
NSMenuItem *aMenuItem;
[super insertItemWithTitle:itemTitle atIndex:index];
aMenuItem = [self itemWithTitle:itemTitle];

View File

@ -938,7 +938,7 @@ static id gSharedProgressController = nil;
return YES;
}
-(BOOL)validateMenuItem:(id <NSMenuItem>)menuItem
-(BOOL)validateMenuItem:(NSMenuItem*)menuItem
{
SEL action = [menuItem action];
if (action == @selector(cancel:)) {

View File

@ -661,7 +661,7 @@ static void FileSystemNotificationProc(FNMessage message, OptionBits flags, void
return [menu autorelease];
}
- (BOOL)validateMenuItem:(id <NSMenuItem>)menuItem
- (BOOL)validateMenuItem:(NSMenuItem*)menuItem
{
SEL action = [menuItem action];
if (action == @selector(cancel:)) {

View File

@ -59,10 +59,10 @@ extern NSString* const NSMenuClosedNotification;
- (void)setAllItemsEnabled:(BOOL)inEnable startingWithItemAtIndex:(int)inFirstItem includingSubmenus:(BOOL)includeSubmenus;
// return the first item (if any) with the given target and action.
- (id<NSMenuItem>)itemWithTarget:(id)anObject andAction:(SEL)actionSelector;
- (NSMenuItem*)itemWithTarget:(id)anObject andAction:(SEL)actionSelector;
// remove items after the given item, or all items if nil
- (void)removeItemsAfterItem:(id<NSMenuItem>)inItem;
- (void)removeItemsAfterItem:(NSMenuItem*)inItem;
// remove all items including and after the given index (i.e. all items if index is 0)
- (void)removeItemsFromIndex:(int)inItemIndex;
@ -82,6 +82,6 @@ extern NSString* const NSMenuClosedNotification;
- (int)tagRemovingMask:(int)tagMask;
// copy the title and enabled state from the given item
- (void)takeStateFromItem:(id<NSMenuItem>)inItem;
- (void)takeStateFromItem:(NSMenuItem*)inItem;
@end

View File

@ -139,7 +139,7 @@ static OSStatus MenuEventHandler(EventHandlerCallRef inHandlerCallRef, EventRef
unsigned int i;
for (i = inFirstItem; i < [menuItems count]; i ++)
{
id<NSMenuItem> curItem = [self itemAtIndex:i];
NSMenuItem* curItem = [self itemAtIndex:i];
[curItem setEnabled:inEnable];
if (includeSubmenus && [curItem hasSubmenu])
{
@ -148,13 +148,13 @@ static OSStatus MenuEventHandler(EventHandlerCallRef inHandlerCallRef, EventRef
}
}
- (id<NSMenuItem>)itemWithTarget:(id)anObject andAction:(SEL)actionSelector
- (NSMenuItem*)itemWithTarget:(id)anObject andAction:(SEL)actionSelector
{
int itemIndex = [self indexOfItemWithTarget:anObject andAction:actionSelector];
return (itemIndex == -1) ? nil : [self itemAtIndex:itemIndex];
}
- (void)removeItemsAfterItem:(id<NSMenuItem>)inItem
- (void)removeItemsAfterItem:(NSMenuItem*)inItem
{
int firstItemToRemoveIndex = 0;
@ -200,7 +200,7 @@ static OSStatus MenuEventHandler(EventHandlerCallRef inHandlerCallRef, EventRef
return ([self tag] & ~tagMask);
}
- (void)takeStateFromItem:(id<NSMenuItem>)inItem
- (void)takeStateFromItem:(NSMenuItem*)inItem
{
[self setTitle:[inItem title]];
[self setEnabled:[inItem isEnabled]];

View File

@ -468,7 +468,7 @@ static NSString* const kExpandedHistoryStatesDefaultsKey = @"history_expand_stat
#pragma mark -
- (BOOL)validateMenuItem:(id <NSMenuItem>)menuItem
- (BOOL)validateMenuItem:(NSMenuItem*)menuItem
{
SEL action = [menuItem action];