]> git.lyx.org Git - features.git/commitdiff
Spellcheck related bugfix from John McCabe-Dansted:
authorRichard Heck <rgheck@comcast.net>
Mon, 8 Mar 2010 13:22:56 +0000 (13:22 +0000)
committerRichard Heck <rgheck@comcast.net>
Mon, 8 Mar 2010 13:22:56 +0000 (13:22 +0000)
PrefSpellchecker disables the "Spellchecker Engine:" selector if
theSpellChecker() reports that no spell checking engine is selected.
This means that if we have not already selected a spell checking
engine we cannot select one now. I think this problem can be
reproduced by first compiling and running LyX without spellchecking
support and then compiling and running LyX with spellchecking support.

In any case it is clear that we should be able to select a
spellchecking engine if one is available, so I propose the attached
patch. This patch fixed the problem on my machine.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33669 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiPrefs.cpp

index d75184f9f7740b512fa5fdc29211c1edc7ef3137..bc4b5b74ed8fa74ba7fea20c1ddcb03218ac5d97 100644 (file)
@@ -1321,7 +1321,7 @@ PrefSpellchecker::PrefSpellchecker(GuiPreferences * form)
        spellcheckerCB->addItem(qt_("hunspell"), QString("hunspell"));
 #endif
 
-       if (theSpellChecker()) {
+       #if defined(USE_ASPELL) || defined(USE_ENCHANT) || defined(USE_HUNSPELL)
                connect(spellcheckerCB, SIGNAL(currentIndexChanged(int)),
                        this, SIGNAL(changed()));
                connect(altLanguageED, SIGNAL(textChanged(QString)),
@@ -1334,14 +1334,14 @@ PrefSpellchecker::PrefSpellchecker(GuiPreferences * form)
                        this, SIGNAL(changed()));
                connect(spellcheckNotesCB, SIGNAL(clicked()),
                        this, SIGNAL(changed()));
-       } else {
+       #else
                spellcheckerCB->setEnabled(false);
                altLanguageED->setEnabled(false);
                escapeCharactersED->setEnabled(false);
                compoundWordCB->setEnabled(false);
                spellcheckContinuouslyCB->setEnabled(false);
                spellcheckNotesCB->setEnabled(false);
-       }
+       #endif
 }