Merge r3994 from the 2.1.8 branch. Closes #999.

Originally committed to SVN as r3995.
This commit is contained in:
Thomas Goyne 2010-01-19 01:05:51 +00:00
parent 8c8f59b5ff
commit 80fdea74e6
2 changed files with 4 additions and 1 deletions

View File

@ -145,7 +145,7 @@ DialogSpellChecker::DialogSpellChecker(wxFrame *parent)
actionsSizer->Add(new wxButton(this,BUTTON_REPLACE_ALL,_("Replace All")),0,wxEXPAND | wxBOTTOM,5);
actionsSizer->Add(new wxButton(this,BUTTON_IGNORE,_("Ignore")),0,wxEXPAND | wxBOTTOM,5);
actionsSizer->Add(new wxButton(this,BUTTON_IGNORE_ALL,_("Ignore all")),0,wxEXPAND | wxBOTTOM,5);
actionsSizer->Add(new wxButton(this,BUTTON_ADD,_("Add to dictionary")),0,wxEXPAND | wxBOTTOM,5);
actionsSizer->Add(addButton = new wxButton(this,BUTTON_ADD,_("Add to dictionary")),0,wxEXPAND | wxBOTTOM,5);
actionsSizer->Add(new HelpButton(this,_T("Spell Checker")),0,wxEXPAND | wxBOTTOM,0);
actionsSizer->AddStretchSpacer(1);
@ -274,6 +274,8 @@ void DialogSpellChecker::SetWord(wxString word) {
grid->editBox->SetToLine(line);
grid->editBox->TextEdit->SetSelectionU(wordStart,wordEnd);
grid->EndBatch();
addButton->Enable(spellchecker->CanAddWord(word));
}

View File

@ -101,6 +101,7 @@ private:
/// DOCME
wxComboBox *language;
wxButton *addButton;
bool FindOrDie();
bool FindNext(int startLine=-1,int startPos=-1);