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:
Eric Wasylishen 2010-09-09 23:50:38 +00:00
parent 8e026b8e66
commit 26fcda321b
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>
* Panels/Spanish.lproj/GSFindPanel.gorm:
Fixed a misspelling.

View file

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

View file

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

View file

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

View file

@ -1457,9 +1457,9 @@ originalContentsURL: (NSURL *)orig
- (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]);
if (sel_eq([anItem action], @selector(saveDocument:)))
if (sel_isEqual([anItem action], @selector(saveDocument:)))
return [self isDocumentEdited];
// 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
{
if (sel_eq([anItem action], @selector(saveAllDocuments:)))
if (sel_isEqual([anItem action], @selector(saveAllDocuments:)))
{
return [self hasEditedDocuments];
}
if (sel_eq([anItem action], @selector(newDocument:)))
if (sel_isEqual([anItem action], @selector(newDocument:)))
{
return ([self defaultType] != nil);
}

View file

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

View file

@ -947,7 +947,7 @@ static BOOL menuBarVisible = YES;
{
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
if ([menuItem target] == anObject)

View file

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

View file

@ -280,7 +280,7 @@
- (void) noResponderFor: (SEL)eventSelector
{
/* Only beep for key down events */
if (sel_eq(eventSelector, @selector(keyDown:)))
if (sel_isEqual(eventSelector, @selector(keyDown:)))
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
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;
if (sel_eq(action, @selector(copy:)))
if (sel_isEqual(action, @selector(copy:)))
return [self selectedRange].length > 0;
if (sel_eq(action, @selector(copyFont:))
|| sel_eq(action, @selector(copyRuler:)))
if (sel_isEqual(action, @selector(copyFont:))
|| sel_isEqual(action, @selector(copyRuler:)))
return [self selectedRange].location != NSNotFound;
if (sel_eq(action, @selector(paste:))
|| sel_eq(action, @selector(pasteAsPlainText:))
|| sel_eq(action, @selector(pasteAsRichText:))
|| sel_eq(action, @selector(pasteFont:))
|| sel_eq(action, @selector(pasteRuler:)))
if (sel_isEqual(action, @selector(paste:))
|| sel_isEqual(action, @selector(pasteAsPlainText:))
|| sel_isEqual(action, @selector(pasteAsRichText:))
|| sel_isEqual(action, @selector(pasteFont:))
|| sel_isEqual(action, @selector(pasteRuler:)))
{
if ([self isEditable])
{
NSArray *types = nil;
NSString *available;
if (sel_eq(action, @selector(paste:)))
if (sel_isEqual(action, @selector(paste:)))
types = [self readablePasteboardTypes];
else if (sel_eq(action, @selector(pasteAsPlainText:)))
else if (sel_isEqual(action, @selector(pasteAsPlainText:)))
types = [NSArray arrayWithObject: NSStringPboardType];
else if (sel_eq(action, @selector(pasteAsRichText:)))
else if (sel_isEqual(action, @selector(pasteAsRichText:)))
types = [NSArray arrayWithObject: NSRTFPboardType];
else if (sel_eq(action, @selector(pasteFont:)))
else if (sel_isEqual(action, @selector(pasteFont:)))
types = [NSArray arrayWithObject: NSFontPboardType];
else if (sel_eq(action, @selector(pasteRuler:)))
else if (sel_isEqual(action, @selector(pasteRuler:)))
types = [NSArray arrayWithObject: NSRulerPboard];
available = [[NSPasteboard generalPasteboard]
@ -2972,11 +2972,11 @@ Scroll so that the beginning of the range is visible.
return NO;
}
if (sel_eq(action, @selector(selectAll:))
|| sel_eq(action, @selector(centerSelectionInVisibleArea:)))
if (sel_isEqual(action, @selector(selectAll:))
|| sel_isEqual(action, @selector(centerSelectionInVisibleArea:)))
return [self isSelectable];
if (sel_eq(action, @selector(performFindPanelAction:)))
if (sel_isEqual(action, @selector(performFindPanelAction:)))
{
if ([self usesFindPanel] == NO)
{

View file

@ -4971,19 +4971,19 @@ current key view.<br />
BOOL result = YES;
SEL action = [anItem action];
if (sel_eq(action, @selector(performClose:)))
if (sel_isEqual(action, @selector(performClose:)))
{
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;
}
else if (sel_eq(action, @selector(performZoom:)))
else if (sel_isEqual(action, @selector(performZoom:)))
{
result = ([self styleMask] & NSResizableWindowMask) ? YES : NO;
}
else if (sel_eq(action, @selector(undo:)))
else if (sel_isEqual(action, @selector(undo:)))
{
NSUndoManager *undo = [_firstResponder undoManager];
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];
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];