From 90b24848ccbb959e2faabd3ece06fa0a0daa33a8 Mon Sep 17 00:00:00 2001 From: wlux Date: Mon, 15 Feb 2010 11:44:03 +0000 Subject: [PATCH] Send messages from the Spelling panel down to the responder chain of the main window only, to avoid spell checking the panel's own text field. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29640 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Source/NSSpellChecker.m | 18 +++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 42686df75..b4cd74b06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-02-15 Wolfgang Lux + + * Source/NSSpellChecker.m (_findNext:, _ignore:, _correct:): Send + messages down to the responder chain of the main window only, to + avoid spell checking the Spelling panel's own text field. + 2010-02-15 Wolfgang Lux * Source/NSTextView.m (-setSelectedRange:affinity:stillSelecting:): diff --git a/Source/NSSpellChecker.m b/Source/NSSpellChecker.m index 60ad6a0c5..9769a0309 100644 --- a/Source/NSSpellChecker.m +++ b/Source/NSSpellChecker.m @@ -534,9 +534,9 @@ inSpellDocumentWithTag:(int)tag - _findNext: (id)sender { - BOOL processed = [NSApp sendAction: @selector(checkSpelling:) - to: nil - from: _spellPanel]; + BOOL processed = [[[NSApp mainWindow] firstResponder] + tryToPerform: @selector(checkSpelling:) + with: _spellPanel]; if (!processed) { @@ -593,9 +593,9 @@ inSpellDocumentWithTag:(int)tag - _ignore: (id)sender { - BOOL processed = [NSApp sendAction: @selector(ignoreSpelling:) - to: nil - from: _wordField]; + BOOL processed = [[[NSApp mainWindow] firstResponder] + tryToPerform: @selector(ignoreSpelling:) + with: _wordField]; if (!processed) { @@ -616,9 +616,9 @@ inSpellDocumentWithTag:(int)tag - _correct: (id)sender { - BOOL processed = [NSApp sendAction: @selector(changeSpelling:) - to: nil - from: _wordField]; + BOOL processed = [[[NSApp mainWindow] firstResponder] + tryToPerform: @selector(changeSpelling:) + with: _wordField]; if (!processed) {