mirror of https://github.com/odrling/Aegisub
Disable the "Add to dictionary" button in the spell checker dialog when the word cannot be added to the dictionary. Updates #999.
Originally committed to SVN as r3994.
This commit is contained in:
parent
3b08a0c51b
commit
f3731231ea
|
@ -123,7 +123,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);
|
||||
|
||||
|
@ -245,6 +245,8 @@ void DialogSpellChecker::SetWord(wxString word) {
|
|||
grid->editBox->SetToLine(line);
|
||||
grid->editBox->TextEdit->SetSelectionU(wordStart,wordEnd);
|
||||
grid->EndBatch();
|
||||
|
||||
addButton->Enable(spellchecker->CanAddWord(word));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -69,6 +69,7 @@ private:
|
|||
wxTextCtrl *replaceWord;
|
||||
wxListBox *suggestList;
|
||||
wxComboBox *language;
|
||||
wxButton *addButton;
|
||||
|
||||
bool FindOrDie();
|
||||
bool FindNext(int startLine=-1,int startPos=-1);
|
||||
|
|
Loading…
Reference in New Issue