From 7276f04fa1ef0e0527fb63aba699676450283afc Mon Sep 17 00:00:00 2001 From: Stephan Witt Date: Thu, 8 Jul 2010 07:56:29 +0000 Subject: [PATCH] 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 --- src/frontends/qt4/GuiApplication.cpp | 1 + src/frontends/qt4/GuiPrefs.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index 7a20361716..fecf5791bc 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -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. diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index d8f1504b4f..8ee71f911b 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -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)), -- 2.39.5