More fix for building on wx pre-2.8

Originally committed to SVN as r701.
This commit is contained in:
Niels Martin Hansen 2007-01-03 22:05:43 +00:00
parent 8b014f41ca
commit 38241d0eb5

View file

@ -813,7 +813,12 @@ void SubsTextEditCtrl::ShowPopupMenu(int activePos) {
if (!nSugs) menu.Append(EDIT_MENU_SUGGESTION,_("No correction suggestions"))->Enable(false);
// Build menu
for (int i=0;i<nSugs;i++) menu.Append(EDIT_MENU_SUGGESTIONS+i,sugs[i])->SetFont(font);
for (int i=0;i<nSugs;i++) {
wxMenuItem *itm = menu.Append(EDIT_MENU_SUGGESTIONS+i,sugs[i]);
#if wxCHECK_VERSION(2, 8, 0)
itm->SetFont(font);
#endif
}
// Append "add word"
menu.Append(EDIT_MENU_ADD_TO_DICT,wxString::Format(_("Add \"%s\" to dictionary"),currentWord.c_str()))->Enable(spellchecker->CanAddWord(currentWord));