mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 03:11:18 +00:00
Adopted implemtantion of [checkSpelling:] to changes in
NSSpellChecker. [updateSpellingPanelWithMisspelledWord:] is now called from here. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11301 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4a1e318a22
commit
cc9acbc54a
1 changed files with 5 additions and 1 deletions
|
@ -846,6 +846,7 @@ static NSNotificationCenter *nc;
|
|||
- (void) checkSpelling: (id)sender
|
||||
{
|
||||
NSSpellChecker *sp = [NSSpellChecker sharedSpellChecker];
|
||||
NSString *misspelledWord = nil;
|
||||
NSRange errorRange;
|
||||
int count = 0;
|
||||
|
||||
|
@ -859,10 +860,13 @@ static NSNotificationCenter *nc;
|
|||
if (errorRange.length)
|
||||
{
|
||||
[self setSelectedRange: errorRange];
|
||||
|
||||
misspelledWord = [[self string] substringFromRange: errorRange];
|
||||
[sp updateSpellingPanelWithMisspelledWord: misspelledWord];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSBeep();
|
||||
[sp updateSpellingPanelWithMisspelledWord: @""];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue