mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 21:40:48 +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
d7eea20d57
commit
295022c274
1 changed files with 5 additions and 1 deletions
|
@ -846,6 +846,7 @@ static NSNotificationCenter *nc;
|
||||||
- (void) checkSpelling: (id)sender
|
- (void) checkSpelling: (id)sender
|
||||||
{
|
{
|
||||||
NSSpellChecker *sp = [NSSpellChecker sharedSpellChecker];
|
NSSpellChecker *sp = [NSSpellChecker sharedSpellChecker];
|
||||||
|
NSString *misspelledWord = nil;
|
||||||
NSRange errorRange;
|
NSRange errorRange;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
|
@ -859,10 +860,13 @@ static NSNotificationCenter *nc;
|
||||||
if (errorRange.length)
|
if (errorRange.length)
|
||||||
{
|
{
|
||||||
[self setSelectedRange: errorRange];
|
[self setSelectedRange: errorRange];
|
||||||
|
|
||||||
|
misspelledWord = [[self string] substringFromRange: errorRange];
|
||||||
|
[sp updateSpellingPanelWithMisspelledWord: misspelledWord];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NSBeep();
|
[sp updateSpellingPanelWithMisspelledWord: @""];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue