User forums > Help
Problem with comments
Lqwertz80:
Hi,
Sorry, I do not speak very good english!
Who can help me?
I have the latest version C::B 12.11 installed, everything is ok to compile my projects in C and C++.
But all comments and "char string" are highlighted in red. I've see if it's possible disable an option but I do not found.
It's really not pleasant to work in editor with this.
I hope my question is understandable.
Thank you in advance.
oBFusCATed:
Yes, disable the spellcheck plugin or install some dictionaries.
http://wiki.codeblocks.org/index.php?title=SpellChecker_plugin
@dev:
1. Probably we should do something about this problem?
2. Disable spellcheck by default?
3. Provide dictionaries?
4. Don't highlight anything if there is no dictionary?
It seems that 4 is the best option...
Alpha:
Click in the bottom right hand corner (on the flag), then select a language.
--- Quote from: oBFusCATed on March 23, 2013, 03:46:51 am ---@dev:
1. Probably we should do something about this problem?
2. Disable spellcheck by default?
3. Provide dictionaries?
4. Don't highlight anything if there is no dictionary?
--- End quote ---
The functioning in the trunk is better than in 12.11; in 12.11, if there are no dictionaries, spellcheck automatically disables itself. Unfortunately, if it does find dictionaries, but none of them are its default language, it will enable on an invalid dictionary.
In the trunk, it selects the user specified dictionary, if available, otherwise the system local, if available, otherwise the first valid dictionary, otherwise disable.
oBFusCATed:
--- Quote from: Alpha on March 23, 2013, 04:00:03 am ---The functioning in the trunk is better than in 12.11; in 12.11, if there are no dictionaries, spellcheck automatically disables itself. Unfortunately, if it does find dictionaries, but none of them are its default language, it will enable on an invalid dictionary.
--- End quote ---
How can it find dictionaries on Windows without the help of the users? As most reports are from Windows users if I recall right.
--- Quote from: Alpha on March 23, 2013, 04:00:03 am ---In the trunk, it selects the user specified dictionary, if available, otherwise the system local, if available, otherwise the first valid dictionary, otherwise disable.
--- End quote ---
I think we should remove this "first valid dictionary". Even using the system's local is dangerous. It should default to English most probably, because most code is written in English.
And after we switch it to English if there are reports, we should just disable it by default and be done with it :)
Alpha:
--- Quote from: oBFusCATed on March 23, 2013, 04:36:13 am ---How can it find dictionaries on Windows without the help of the users?
--- End quote ---
Magic ;) .
... actually, it guesses a few likely locations:
src/plugins/contrib/SpellChecker/SpellCheckerConfig.cpp
--- Code: ---const wxString SpellCheckerConfig::GetDictionaryPath()const
{
wxArrayString dictPaths;
dictPaths.Add(m_DictPath);
Manager::Get()->GetMacrosManager()->ReplaceEnvVars(dictPaths[0]);
if (platform::windows)
{
wxString programs = wxT("C:\\Program Files");
wxGetEnv(wxT("ProgramFiles"), &programs);
dictPaths.Add(programs + wxT("\\Mozilla Firefox\\dictionaries"));
dictPaths.Add(programs + wxT("\\Mozilla\\Firefox\\dictionaries"));
dictPaths.Add(programs + wxT("\\Mozilla Thunderbird\\dictionaries"));
dictPaths.Add(programs + wxT("\\Mozilla\\Thunderbird\\dictionaries"));
wxString libreOffice = wxFindFirstFile(programs + wxT("\\*LibreOffice*"), wxDIR);
wxString openOffice = wxFindFirstFile(programs + wxT("\\*OpenOffice*"), wxDIR);
wxArrayString langs = GetArrayFromString(wxT("en;fr;es;de"));
for (size_t i = 0; i < langs.GetCount(); ++i)
{
if (!libreOffice.IsEmpty())
dictPaths.Add(libreOffice + wxT("\\share\\extensions\\dict-") + langs[i]);
if (!openOffice.IsEmpty())
dictPaths.Add(openOffice + wxT("\\share\\extensions\\dict-") + langs[i]);
}
}
else
{
dictPaths.Add(wxT("/usr/share/hunspell"));
dictPaths.Add(wxT("/usr/share/myspell/dicts"));
}
dictPaths.Add(m_pPlugin->GetOnlineCheckerConfigPath());
for (size_t i = 0; i < dictPaths.GetCount(); ++i)
{
if (wxDirExists(dictPaths[i]) && !wxFindFirstFile(dictPaths[i] + wxFILE_SEP_PATH + wxT("*.dic"), wxFILE).IsEmpty())
return dictPaths[i];
}
return dictPaths[0];
}
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version