Closed Bug 1176602 Opened 9 years ago Closed 9 years ago

Make sure that the dictionary stored in spellchecker.dictionary is valid (Adapt Thunderbird Bug 1175908)

Categories

(SeaMonkey :: MailNews: Composition, defect)

defect
Not set
normal

Tracking

(seamonkey2.37 fixed, seamonkey2.38+ fixed, seamonkey2.39 fixed, seamonkey2.40 fixed)

RESOLVED FIXED
seamonkey2.40
Tracking Status
seamonkey2.37 --- fixed
seamonkey2.38 + fixed
seamonkey2.39 --- fixed
seamonkey2.40 --- fixed

People

(Reporter: philip.chee, Assigned: philip.chee)

References

Details

Attachments

(1 file, 2 obsolete files)

See TB Bug 1175908 - No dictionary selected after upgrade from TB 31 to TB 38 when xy_XY dictionary was selected before upgrade Regression caused by Bug 1097550
Attached patch Patch v1.0 Get a valid spellchecker dictionary. (obsolete) (deleted) — Splinter Review
Adapted from the Thunderbird patch in Bug 1175908
Assignee: nobody → philip.chee
Status: NEW → ASSIGNED
Attachment #8627288 - Flags: review?(neil)
Comment on attachment 8627288 [details] [diff] [review] Patch v1.0 Get a valid spellchecker dictionary. Huh; I opened about:config, set spellchecker.dictionary to an invalid value, restarted, and it had been reset to en-US. I wonder how that happened...
I edit prefs.js and then start. Invalid value stays. Well, that's in TB.
STR: 1) I set spellchecker.dictionary to foo_bar_baz and restarted. spellchecker.dictionary didn't change. 2) Open MailNews. spellchecker.dictionary didn't change. 3) Click on the Compose button. spellchecker.dictionary changes to en-GB
Flags: needinfo?(neil)
Comment on attachment 8627288 [details] [diff] [review] Patch v1.0 Get a valid spellchecker dictionary. I don't think this is the right place to do this; suite glue perhaps?
Flags: needinfo?(neil)
Attachment #8627288 - Flags: review?(neil) → review-
Attached patch Patch v2.0 Moved fix to nsSuiteGlue.js (obsolete) (deleted) — Splinter Review
(In reply to neil@parkwaycc.co.uk from comment #5) > I don't think this is the right place to do this; suite glue perhaps? Moved to nsSuiteGlue.js
Attachment #8627288 - Attachment is obsolete: true
Attachment #8646505 - Flags: review?(neil)
Comment on attachment 8646505 [details] [diff] [review] Patch v2.0 Moved fix to nsSuiteGlue.js >+ this._updateDownloadPrefs(); That's a weird thing to do. If you think _updatePrefs() is getting too big then split it into three and change the caller. >+ if (prefValue.indexOf("_") > -1) { if (/_/.test(prefValue))
Attachment #8646505 - Flags: review?(neil) → feedback+
Attached patch Patch v3.0 fix nits (deleted) — Splinter Review
>+ if (prefValue.indexOf("_") > -1) { > if (/_/.test(prefValue)) Fixed. >+ this._updateDownloadPrefs(); > That's a weird thing to do. If you think _updatePrefs() is getting too big > then split it into three and change the caller. I originally stuck my code at the end of _updatePrefs() and then wondered why it wasn't working. Then I noticed that there was an early return in the download preferences migration. > + _updateDownloadPrefs: function() > + { > // Migration of download-manager preferences > if (Services.prefs.getPrefType("browser.download.dir") == Services.prefs.PREF_INVALID || > Services.prefs.getPrefType("browser.download.lastDir") != Services.prefs.PREF_INVALID) > return; //Do nothing if .dir does not exist, or if it exists and lastDir does not I split that part off and added a caller to it in _onProfileStartup()
Attachment #8646505 - Attachment is obsolete: true
Attachment #8648715 - Flags: review?(neil)
Summary: In message compose make sure that the dictionary stored in spellchecker.dictionary is valid (Adapt Thunderbird Bug 1175908) → Make sure that the dictionary stored in spellchecker.dictionary is valid (Adapt Thunderbird Bug 1175908)
(In reply to Philip Chee from comment #8) > I originally stuck my code at the end of _updatePrefs() and then wondered > why it wasn't working. Then I noticed that there was an early return in the > download preferences migration. > > I split that part off and added a caller to it in _onProfileStartup() Good catch.
Comment on attachment 8648715 [details] [diff] [review] Patch v3.0 fix nits >+ var dictList = o1.value; >+ // If the preference contains an invalid dictionary, set it to a valid >+ // dictionary, any dictionary will do. >+ if (dictList.length && dictList.indexOf(prefValue) < 0) >+ Services.prefs.setCharPref(prefName, dictList[0]); Nit: wrong indentation on the last two lines above.
Attachment #8648715 - Flags: review?(neil) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.40
Comment on attachment 8648715 [details] [diff] [review] Patch v3.0 fix nits [Approval Request Comment] Regression caused by (bug #): Not a regression. User impact if declined: If a dictionary with its name in the form xy_XY was selected before upgrade then *no* dictionary is selected after upgrade to TB 38/ SM 2.35 Testing completed (on m-c, etc.): baked in Thunderbird and SeaMonkey Risk to taking this patch (and alternatives if risky): Risk is low to none. String changes made by this patch: None.
Attachment #8648715 - Flags: approval-comm-release?
Attachment #8648715 - Flags: approval-comm-beta?
Attachment #8648715 - Flags: approval-comm-aurora?
Comment on attachment 8648715 [details] [diff] [review] Patch v3.0 fix nits a=me
Attachment #8648715 - Flags: approval-comm-release?
Attachment #8648715 - Flags: approval-comm-release+
Attachment #8648715 - Flags: approval-comm-beta?
Attachment #8648715 - Flags: approval-comm-beta+
Attachment #8648715 - Flags: approval-comm-aurora?
Attachment #8648715 - Flags: approval-comm-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: