From 1ae91cf9fdb1dc8292404bf2d6c58384f0557eda Mon Sep 17 00:00:00 2001 From: craig Date: Thu, 7 Jun 2012 20:01:10 +0000 Subject: Add in dictionary downloader code, updates to downloader threading and add in GUI to hyphenator preferences for downloading git-svn-id: svn://scribus.net/branches/Version14x/Scribus@17542 11d20701-8431-0410-a711-e3c959e3b870 --- .../tools/hunspellcheck/hunspellpluginimpl.cpp | 40 ++++------------------ 1 file changed, 6 insertions(+), 34 deletions(-) (limited to 'scribus/plugins/tools/hunspellcheck/hunspellpluginimpl.cpp') diff --git a/scribus/plugins/tools/hunspellcheck/hunspellpluginimpl.cpp b/scribus/plugins/tools/hunspellcheck/hunspellpluginimpl.cpp index be5cfda..2ff9493 100644 --- a/scribus/plugins/tools/hunspellcheck/hunspellpluginimpl.cpp +++ b/scribus/plugins/tools/hunspellcheck/hunspellpluginimpl.cpp @@ -32,7 +32,7 @@ for which a new license (GPL+exception) is in place. HunspellPluginImpl::HunspellPluginImpl() : QObject(0) { //hspellers=NULL; - numDicts=0; +// numDicts=0; m_runningForSE=false; m_SE=NULL; } @@ -45,7 +45,7 @@ HunspellPluginImpl::~HunspellPluginImpl() h = NULL; } hspellerMap.clear(); - numDicts = 0; +// numDicts = 0; } bool HunspellPluginImpl::run(const QString & target, ScribusDoc* doc) @@ -62,45 +62,17 @@ bool HunspellPluginImpl::run(const QString & target, ScribusDoc* doc) return spellCheckOk; } -bool HunspellPluginImpl::findDictionaries() -{ - dictionaryPaths=ScPaths::instance().spellDirs(); - if (dictionaryPaths.count()==0) - return false; - return true; -} - bool HunspellPluginImpl::initHunspell() { - bool dictPathFound=findDictionaries(); + bool dictPathFound=LanguageManager::instance()->findDictionaries(dictionaryPaths); if (!dictPathFound) { qDebug()<<"No preinstalled dictonary paths found"; return false; } - for (int i=0; ifindDictionarySets(dictionaryPaths, dictionaryMap); +// numDicts=dictionaryMap.count(); if (dictionaryMap.count()==0) return false; -- cgit