feat: load local directories for spellchecking (#6730)
Reviewed-by: pajlada <rasmus.karlsson+github@pajlada.com>
This commit is contained in:
@@ -248,9 +248,8 @@ void ExternalToolsPage::initLayout(GeneralPageView &layout)
|
||||
"dictionaries in " %
|
||||
formatRichNamedLink(getApp()->getPaths().dictionariesDirectory,
|
||||
getApp()->getPaths().dictionariesDirectory) %
|
||||
u". The file index.aff has to contain the affixes and "
|
||||
u"index.dic "
|
||||
u"must contain the dictionary (subject to change).");
|
||||
u". Dictionaries are pairs of .aff (affixes) and .dic (dictionary) "
|
||||
u"files.");
|
||||
|
||||
SettingWidget::checkbox("Check spelling by default",
|
||||
s.enableSpellChecking)
|
||||
@@ -268,14 +267,13 @@ void ExternalToolsPage::initLayout(GeneralPageView &layout)
|
||||
std::vector<std::pair<QString, QVariant>> dictList{{"None", ""}};
|
||||
|
||||
std::ranges::transform(
|
||||
getApp()->getSpellChecker()->getSystemDictionaries(),
|
||||
getApp()->getSpellChecker()->getAvailableDictionaries(),
|
||||
std::back_inserter(dictList), toItem);
|
||||
|
||||
if (dictList.size() > 1)
|
||||
{
|
||||
SettingWidget::dropdown(
|
||||
"Fallback spellchecking dictionary (requires restart)",
|
||||
s.spellCheckingFallback, dictList)
|
||||
SettingWidget::dropdown("Default dictionary (requires restart)",
|
||||
s.spellCheckingDefaultDictionary, dictList)
|
||||
->addTo(layout);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user