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.

I had a look at the PrefSpellchecker::PrefSpellchecker function in
branch, and it appears that branch does not have this bug.

-- 
John C. McCabe-Dansted
Index: src/frontends/qt4/GuiPrefs.cpp
===================================================================
--- src/frontends/qt4/GuiPrefs.cpp	(revision 33666)
+++ src/frontends/qt4/GuiPrefs.cpp	(working copy)
@@ -1321,7 +1321,7 @@
 	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 @@
 			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
 }
 
 

Reply via email to