sepllcheck dictionary

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
Fedor2

sepllcheck dictionary

Unread post by Fedor2 » 2017-03-27, 03:02

In Pale Moon 26 there is spellchecker.dictionary.override setting. But in the 27 it was removed, instead there is spellchecker.dictionary but it never do its purpose.

So i found that changing only one string in
editor\composer\nsEditorSpellCheck.cpp
allow use it as that in PM 26.

Code: Select all

***** nsEditorSpellCheck.bak
  nsAutoString preferedDict(Preferences::GetLocalizedString("spellchecker.dictionary"));
  if (dictName.IsEmpty()) {
    dictName.Assign(preferedDict);
***** nsEditorSpellCheck.CPP
  nsAutoString preferedDict(Preferences::GetLocalizedString("spellchecker.dictionary"));
  //MYPAL CODE
  if (!preferedDict.IsEmpty()) {
    dictName.Assign(preferedDict);
*****
And i suggest make this into regular PM code

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35620
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: sepllcheck dictionary

Unread post by Moonchild » 2017-03-27, 12:04

That's not a good solution. spellcheck.dictionary is used only when no other dictionary preferences (page language, element language) take precedence.
This is different with the platform update than what we had before, and we should simply reintroduce the .override as an extra pref to "always use this, regardless" preference. Issue #980
Simple change, patches welcome.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Fedor2

Re: sepllcheck dictionary

Unread post by Fedor2 » 2017-03-28, 16:23

Seems i could to add new setting.

And i have done patch

Code: Select all

741a742,747
>   // Get global preferred language from preferences, if set.
>   nsAutoString preferedDict(Preferences::GetLocalizedString("spellchecker.dictionary.override"));
>   if (!preferedDict.IsEmpty()) {
>     dictName.Assign(preferedDict);
>   }
> 
747c753
<   if (!mPreferredLang.IsEmpty()) {
---
>   if (dictName.IsEmpty() && !mPreferredLang.IsEmpty()) {
752c758
<   nsAutoString preferedDict(Preferences::GetLocalizedString("spellchecker.dictionary"));
---
>   preferedDict=Preferences::GetLocalizedString("spellchecker.dictionary");
Is it right?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35620
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: sepllcheck dictionary

Unread post by Moonchild » 2017-03-30, 17:16

No I'm afraid that won't do.

I'll poke at it myself when I have a free moment.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35620
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: sepllcheck dictionary

Unread post by Moonchild » 2017-03-30, 19:04

The logic in place was not very logical, so I went in and re-implemented what we had before. This removed the "spellchecker.dictionary" pref since that was just a "holding" pref anyway and could make dictionary choice bleed through to the next site visited - not a good thing.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked