Replace sel_eq with sel_isEqual

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31285 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
ericwa 2010-09-09 23:50:38 +00:00
parent 8c3501132d
commit 82ac6117e8
12 changed files with 56 additions and 41 deletions

View file

@ -1,3 +1,18 @@
2010-09-09 Eric Wasylishen <ewasylishen@gmail.com>
* Source/GSTheme.m:
* Source/NSMenu.m:
* Source/NSWindow.m:
* Source/NSObjectController.m:
* Source/NSImageView.m:
* Source/NSResponder.m:
* Source/NSApplication.m:
* Source/NSComboBox.m:
* Source/NSTextView.m:
* Source/NSDocumentController.m:
* Source/NSDocument.m:
Replace sel_eq with sel_isEqual
2010-09-06 German Arias <german@xelalug.org> 2010-09-06 German Arias <german@xelalug.org>
* Panels/Spanish.lproj/GSFindPanel.gorm: * Panels/Spanish.lproj/GSFindPanel.gorm:
Fixed a misspelling. Fixed a misspelling.

View file

@ -1345,7 +1345,7 @@ typedef struct {
* signature of methodSignatureForSelector:, so we hack in * signature of methodSignatureForSelector:, so we hack in
* the signature required manually :-( * the signature required manually :-(
*/ */
if (sel_eq(aSelector, _cmd)) if (sel_isEqual(aSelector, _cmd))
{ {
static NSMethodSignature *sig = nil; static NSMethodSignature *sig = nil;

View file

@ -3014,13 +3014,13 @@ image.</p><p>See Also: -applicationIconImage</p>
count = [itemArray count]; count = [itemArray count];
i = 0; i = 0;
if (count > 0 && sel_eq([[itemArray objectAtIndex: 0] action], if (count > 0 && sel_isEqual([[itemArray objectAtIndex: 0] action],
@selector(arrangeInFront:))) @selector(arrangeInFront:)))
i++; i++;
if (count > i && sel_eq([[itemArray objectAtIndex: count-1] action], if (count > i && sel_isEqual([[itemArray objectAtIndex: count-1] action],
@selector(performClose:))) @selector(performClose:)))
count--; count--;
if (count > i && sel_eq([[itemArray objectAtIndex: count-1] action], if (count > i && sel_isEqual([[itemArray objectAtIndex: count-1] action],
@selector(performMiniaturize:))) @selector(performMiniaturize:)))
count--; count--;

View file

@ -491,7 +491,7 @@ static NSNotificationCenter *nc;
{ {
if ([super textView: textView doCommandBySelector: command]) if ([super textView: textView doCommandBySelector: command])
return YES; return YES;
if (sel_eq(command, @selector(moveDown:))) if (sel_isEqual(command, @selector(moveDown:)))
{ {
[_cell _performClickWithFrame: [self bounds] inView: self]; [_cell _performClickWithFrame: [self bounds] inView: self];
return YES; return YES;

View file

@ -1457,9 +1457,9 @@ originalContentsURL: (NSURL *)orig
- (BOOL) validateUserInterfaceItem: (id <NSValidatedUserInterfaceItem>)anItem - (BOOL) validateUserInterfaceItem: (id <NSValidatedUserInterfaceItem>)anItem
{ {
if (sel_eq([anItem action], @selector(revertDocumentToSaved:))) if (sel_isEqual([anItem action], @selector(revertDocumentToSaved:)))
return ([self fileName] != nil && [self isDocumentEdited]); return ([self fileName] != nil && [self isDocumentEdited]);
if (sel_eq([anItem action], @selector(saveDocument:))) if (sel_isEqual([anItem action], @selector(saveDocument:)))
return [self isDocumentEdited]; return [self isDocumentEdited];
// FIXME should validate spa popup items; return YES if it's a native type. // FIXME should validate spa popup items; return YES if it's a native type.

View file

@ -1188,11 +1188,11 @@ static BOOL _shouldClose = YES;
- (BOOL) validateUserInterfaceItem: (id <NSValidatedUserInterfaceItem>)anItem - (BOOL) validateUserInterfaceItem: (id <NSValidatedUserInterfaceItem>)anItem
{ {
if (sel_eq([anItem action], @selector(saveAllDocuments:))) if (sel_isEqual([anItem action], @selector(saveAllDocuments:)))
{ {
return [self hasEditedDocuments]; return [self hasEditedDocuments];
} }
if (sel_eq([anItem action], @selector(newDocument:))) if (sel_isEqual([anItem action], @selector(newDocument:)))
{ {
return ([self defaultType] != nil); return ([self defaultType] != nil);
} }

View file

@ -230,12 +230,12 @@ static Class imageCellClass;
if (_allowsCutCopyPaste) if (_allowsCutCopyPaste)
{ {
if (sel_eq(action, @selector(cut:)) || if (sel_isEqual(action, @selector(cut:)) ||
sel_eq(action, @selector(copy:)) || sel_isEqual(action, @selector(copy:)) ||
sel_eq(action, @selector(deleteBackward:)) || sel_isEqual(action, @selector(deleteBackward:)) ||
sel_eq(action, @selector(delete:))) sel_isEqual(action, @selector(delete:)))
return [self image] != nil; return [self image] != nil;
if (sel_eq(action, @selector(paste:))) if (sel_isEqual(action, @selector(paste:)))
{ {
return [NSImage canInitWithPasteboard: return [NSImage canInitWithPasteboard:
[NSPasteboard generalPasteboard]]; [NSPasteboard generalPasteboard]];

View file

@ -947,7 +947,7 @@ static BOOL menuBarVisible = YES;
{ {
NSMenuItem *menuItem = [_items objectAtIndex: i]; NSMenuItem *menuItem = [_items objectAtIndex: i];
if (actionSelector == 0 || sel_eq([menuItem action], actionSelector)) if (actionSelector == 0 || sel_isEqual([menuItem action], actionSelector))
{ {
// There are different possibilities to implement the check here // There are different possibilities to implement the check here
if ([menuItem target] == anObject) if ([menuItem target] == anObject)

View file

@ -354,11 +354,11 @@
{ {
SEL action = [item action]; SEL action = [item action];
if (sel_eq(action, @selector(add:))) if (sel_isEqual(action, @selector(add:)))
{ {
return [self canAdd]; return [self canAdd];
} }
else if (sel_eq(action, @selector(remove:))) else if (sel_isEqual(action, @selector(remove:)))
{ {
return [self canRemove]; return [self canRemove];
} }

View file

@ -280,7 +280,7 @@
- (void) noResponderFor: (SEL)eventSelector - (void) noResponderFor: (SEL)eventSelector
{ {
/* Only beep for key down events */ /* Only beep for key down events */
if (sel_eq(eventSelector, @selector(keyDown:))) if (sel_isEqual(eventSelector, @selector(keyDown:)))
NSBeep(); NSBeep();
} }

View file

@ -2932,36 +2932,36 @@ Scroll so that the beginning of the range is visible.
// FIXME The list of validated actions below is far from complete // FIXME The list of validated actions below is far from complete
if (sel_eq(action, @selector(cut:)) || sel_eq(action, @selector(delete:))) if (sel_isEqual(action, @selector(cut:)) || sel_isEqual(action, @selector(delete:)))
return [self isEditable] && [self selectedRange].length > 0; return [self isEditable] && [self selectedRange].length > 0;
if (sel_eq(action, @selector(copy:))) if (sel_isEqual(action, @selector(copy:)))
return [self selectedRange].length > 0; return [self selectedRange].length > 0;
if (sel_eq(action, @selector(copyFont:)) if (sel_isEqual(action, @selector(copyFont:))
|| sel_eq(action, @selector(copyRuler:))) || sel_isEqual(action, @selector(copyRuler:)))
return [self selectedRange].location != NSNotFound; return [self selectedRange].location != NSNotFound;
if (sel_eq(action, @selector(paste:)) if (sel_isEqual(action, @selector(paste:))
|| sel_eq(action, @selector(pasteAsPlainText:)) || sel_isEqual(action, @selector(pasteAsPlainText:))
|| sel_eq(action, @selector(pasteAsRichText:)) || sel_isEqual(action, @selector(pasteAsRichText:))
|| sel_eq(action, @selector(pasteFont:)) || sel_isEqual(action, @selector(pasteFont:))
|| sel_eq(action, @selector(pasteRuler:))) || sel_isEqual(action, @selector(pasteRuler:)))
{ {
if ([self isEditable]) if ([self isEditable])
{ {
NSArray *types = nil; NSArray *types = nil;
NSString *available; NSString *available;
if (sel_eq(action, @selector(paste:))) if (sel_isEqual(action, @selector(paste:)))
types = [self readablePasteboardTypes]; types = [self readablePasteboardTypes];
else if (sel_eq(action, @selector(pasteAsPlainText:))) else if (sel_isEqual(action, @selector(pasteAsPlainText:)))
types = [NSArray arrayWithObject: NSStringPboardType]; types = [NSArray arrayWithObject: NSStringPboardType];
else if (sel_eq(action, @selector(pasteAsRichText:))) else if (sel_isEqual(action, @selector(pasteAsRichText:)))
types = [NSArray arrayWithObject: NSRTFPboardType]; types = [NSArray arrayWithObject: NSRTFPboardType];
else if (sel_eq(action, @selector(pasteFont:))) else if (sel_isEqual(action, @selector(pasteFont:)))
types = [NSArray arrayWithObject: NSFontPboardType]; types = [NSArray arrayWithObject: NSFontPboardType];
else if (sel_eq(action, @selector(pasteRuler:))) else if (sel_isEqual(action, @selector(pasteRuler:)))
types = [NSArray arrayWithObject: NSRulerPboard]; types = [NSArray arrayWithObject: NSRulerPboard];
available = [[NSPasteboard generalPasteboard] available = [[NSPasteboard generalPasteboard]
@ -2972,11 +2972,11 @@ Scroll so that the beginning of the range is visible.
return NO; return NO;
} }
if (sel_eq(action, @selector(selectAll:)) if (sel_isEqual(action, @selector(selectAll:))
|| sel_eq(action, @selector(centerSelectionInVisibleArea:))) || sel_isEqual(action, @selector(centerSelectionInVisibleArea:)))
return [self isSelectable]; return [self isSelectable];
if (sel_eq(action, @selector(performFindPanelAction:))) if (sel_isEqual(action, @selector(performFindPanelAction:)))
{ {
if ([self usesFindPanel] == NO) if ([self usesFindPanel] == NO)
{ {

View file

@ -4971,19 +4971,19 @@ current key view.<br />
BOOL result = YES; BOOL result = YES;
SEL action = [anItem action]; SEL action = [anItem action];
if (sel_eq(action, @selector(performClose:))) if (sel_isEqual(action, @selector(performClose:)))
{ {
result = ([self styleMask] & NSClosableWindowMask) ? YES : NO; result = ([self styleMask] & NSClosableWindowMask) ? YES : NO;
} }
else if (sel_eq(action, @selector(performMiniaturize:))) else if (sel_isEqual(action, @selector(performMiniaturize:)))
{ {
result = ([self styleMask] & NSMiniaturizableWindowMask) ? YES : NO; result = ([self styleMask] & NSMiniaturizableWindowMask) ? YES : NO;
} }
else if (sel_eq(action, @selector(performZoom:))) else if (sel_isEqual(action, @selector(performZoom:)))
{ {
result = ([self styleMask] & NSResizableWindowMask) ? YES : NO; result = ([self styleMask] & NSResizableWindowMask) ? YES : NO;
} }
else if (sel_eq(action, @selector(undo:))) else if (sel_isEqual(action, @selector(undo:)))
{ {
NSUndoManager *undo = [_firstResponder undoManager]; NSUndoManager *undo = [_firstResponder undoManager];
if (undo == nil) if (undo == nil)
@ -5003,7 +5003,7 @@ current key view.<br />
} }
} }
} }
else if (sel_eq(action, @selector(redo:))) else if (sel_isEqual(action, @selector(redo:)))
{ {
NSUndoManager *undo = [_firstResponder undoManager]; NSUndoManager *undo = [_firstResponder undoManager];
if (undo == nil) if (undo == nil)
@ -5023,7 +5023,7 @@ current key view.<br />
} }
} }
} }
else if (sel_eq(action, @selector(toggleToolbarShown:))) else if (sel_isEqual(action, @selector(toggleToolbarShown:)))
{ {
NSToolbar *toolbar = [self toolbar]; NSToolbar *toolbar = [self toolbar];