provide native spell checker for Mac OS X

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34812 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Stephan Witt 2010-07-08 07:56:29 +00:00
parent b12da1968a
commit 7276f04fa1
2 changed files with 9 additions and 1 deletions

View File

@ -782,6 +782,7 @@ GuiApplication::GuiApplication(int & argc, char ** argv)
// FIXME: Do we need a lyxrc setting for this on Mac? This behaviour
// seems to be the default case for applications like LyX.
setQuitOnLastWindowClosed(false);
// setAttribute(Qt::AA_MacDontSwapCtrlAndMeta);
// This allows to translate the strings that appear in the LyX menu.
/// A translator suitable for the entries in the LyX menu.

View File

@ -1335,6 +1335,13 @@ PrefSpellchecker::PrefSpellchecker(GuiPreferences * form)
{
setupUi(this);
// FIXME: this check should test the target platform (darwin)
#ifdef USE_MACOSX_PACKAGING
spellcheckerCB->addItem(qt_("native"), QString("native"));
#define CONNECT_APPLESPELL
#else
#undef CONNECT_APPLESPELL
#endif
#if defined(USE_ASPELL)
spellcheckerCB->addItem(qt_("aspell"), QString("aspell"));
#endif
@ -1345,7 +1352,7 @@ PrefSpellchecker::PrefSpellchecker(GuiPreferences * form)
spellcheckerCB->addItem(qt_("hunspell"), QString("hunspell"));
#endif
#if defined(USE_ASPELL) || defined(USE_ENCHANT) || defined(USE_HUNSPELL)
#if defined(CONNECT_APPLESPELL) || defined(USE_ASPELL) || defined(USE_ENCHANT) || defined(USE_HUNSPELL)
connect(spellcheckerCB, SIGNAL(currentIndexChanged(int)),
this, SIGNAL(changed()));
connect(altLanguageED, SIGNAL(textChanged(QString)),