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)
SeaMonkey
MailNews: Composition
Tracking
(seamonkey2.37 fixed, seamonkey2.38+ fixed, seamonkey2.39 fixed, seamonkey2.40 fixed)
RESOLVED
FIXED
seamonkey2.40
People
(Reporter: philip.chee, Assigned: philip.chee)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
neil
:
review+
iannbugzilla
:
approval-comm-aurora+
iannbugzilla
:
approval-comm-beta+
iannbugzilla
:
approval-comm-release+
|
Details | Diff | Splinter Review |
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
Assignee | ||
Updated•9 years ago
|
Blocks: SM2.35-Uplift
Assignee | ||
Comment 1•9 years ago
|
||
Adapted from the Thunderbird patch in Bug 1175908
Comment 2•9 years ago
|
||
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...
Comment 3•9 years ago
|
||
I edit prefs.js and then start. Invalid value stays. Well, that's in TB.
Assignee | ||
Comment 4•9 years ago
|
||
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 5•9 years ago
|
||
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-
Assignee | ||
Comment 6•9 years ago
|
||
(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 7•9 years ago
|
||
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+
Assignee | ||
Comment 8•9 years ago
|
||
>+ 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)
Assignee | ||
Updated•9 years ago
|
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)
Comment 9•9 years ago
|
||
(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 10•9 years ago
|
||
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+
Assignee | ||
Comment 11•9 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox41:
affected → ---
status-seamonkey2.40:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.40
Assignee | ||
Comment 12•9 years ago
|
||
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 13•9 years ago
|
||
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+
Assignee | ||
Comment 14•9 years ago
|
||
http://hg.mozilla.org/releases/comm-aurora/rev/59f5f2f3a783
http://hg.mozilla.org/releases/comm-beta/rev/92570e1ca52e
http://hg.mozilla.org/releases/comm-release/rev/1be679fa13d5
status-seamonkey2.37:
--- → fixed
status-seamonkey2.38:
--- → fixed
status-seamonkey2.39:
--- → fixed
tracking-seamonkey2.38:
--- → +
You need to log in
before you can comment on or make changes to this bug.
Description
•