mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 07:10:47 +00:00
Add implementation for validateUserInterfaceAction:
This commit is contained in:
parent
a02336f84f
commit
4d90930d64
2 changed files with 15 additions and 0 deletions
|
@ -23,6 +23,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "AppKit/NSTextCheckingController.h"
|
#import "AppKit/NSTextCheckingController.h"
|
||||||
|
#import "AppKit/NSSpellChecker.h"
|
||||||
|
|
||||||
@implementation NSTextCheckingController
|
@implementation NSTextCheckingController
|
||||||
|
|
||||||
|
@ -61,6 +62,13 @@
|
||||||
|
|
||||||
- (void) checkSpelling: (id)sender
|
- (void) checkSpelling: (id)sender
|
||||||
{
|
{
|
||||||
|
int wordCount = 0;
|
||||||
|
[[NSSpellChecker sharedSpellChecker] checkSpellingOfString: [_client string]
|
||||||
|
startingAt: 0
|
||||||
|
language: nil
|
||||||
|
wrap: NO
|
||||||
|
inSpellDocumentWithTag: _spellCheckerDocumentTag
|
||||||
|
wordCount: &wordCount];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) checkTextInRange: (NSRange)range
|
- (void) checkTextInRange: (NSRange)range
|
||||||
|
|
|
@ -185,6 +185,13 @@
|
||||||
|
|
||||||
- (BOOL) validateUserInterfaceAction: (id<NSValidatedUserInterfaceItem>)item
|
- (BOOL) validateUserInterfaceAction: (id<NSValidatedUserInterfaceItem>)item
|
||||||
{
|
{
|
||||||
|
SEL action = [item action];
|
||||||
|
if (sel_isEqual(action, @selector(performTextFinderAction:)) ||
|
||||||
|
sel_isEqual(action, @selector(performFindPanelAction:)))
|
||||||
|
{
|
||||||
|
return [self validateAction: [item tag]];
|
||||||
|
}
|
||||||
|
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue