Closed Bug 294251 Opened 19 years ago Closed 19 years ago

Spell as you type: Can not add entries to personal dictionary (persdict.dat) via popup

Categories

(SeaMonkey :: MailNews: Message Display, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bugzilla.spam2, Assigned: iannbugzilla)

References

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050515
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050515

From bug 291799 :

It seems that persdict.dat is not updated when using the right click popup and
"Add To Dictionary". 
Adding a new word to the personal dictionary removes the dotted line and the
addition seems to be stored in memory as I do not have to readd it as long I do
not close Mozilla. So it looks like that persdict.dat is not written to disc
when closing Mozilla.
Adding a new word via the normal spell check frontend still works and this bug
does not appear with Thunderbird.

Reproducible: Always

Steps to Reproduce:
Confirming. All/All
Not sure if this a frontend or backend bug but I'll leave where it is at the moment.

As I commented in bug 291799:
I've looked at the front end code and, at the moment, cannot see anything it is
doing that is different to TB. As far as I can see mPersonalDictionary's
EndSession() is not being called and it should be when mozSpellChecker is deleted.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking-seamonkey1.0a+
OS: Windows XP → All
Hardware: PC → All
Done a bit more digging:
res = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(theFile));
is failing for mozilla for some reason.
http://lxr.mozilla.org/seamonkey/source/extensions/spellcheck/src/mozPersonalDictionary.cpp#172
We should be ending the session when the compose window is closed, so that words
don't get ignored in new windows. We'd still get issues with multiple compose
windows, but I'd say that's a bug in spell as you type backend.

The alternative fix would be a profile shutdown observer, then we'd be able to
save the file when switching profiles too.
I'm guessing we are looking somewhere like the function
SwitchInsertCharToAnotherEditorOrClose() -
http://lxr.mozilla.org/seamonkey/source/editor/ui/composer/content/editor.js#3168
to end the session?
EditorCleanup() would probably be the right place, if you moved Spell as you
Type into Editor. Otherwise I guess you would have to do it from
MsgComposeCommands.js in the two places that call EditorCleanup.
This patch:
* Add calls to stop the inline spellchecker when the compose window is closed
so the personal dictionary is saved
Assignee: mail → bugzilla
Status: NEW → ASSIGNED
Attachment #183852 - Flags: review?(neil.parkwaycc.co.uk)
Attachment #183852 - Flags: review?(neil.parkwaycc.co.uk) → review+
Attachment #183852 - Flags: superreview?(bienvenu)
Attachment #183852 - Flags: superreview?(bienvenu) → superreview+
Comment on attachment 183852 [details] [diff] [review]
Patch v0.1 (Checked in)

Requesting a= for suite-only, fairly low risk patch
Attachment #183852 - Flags: approval1.8b2?
Comment on attachment 183852 [details] [diff] [review]
Patch v0.1 (Checked in)

a=asa for seamonkey only change.
Attachment #183852 - Flags: approval1.8b2? → approval1.8b2+
Comment on attachment 183852 [details] [diff] [review]
Patch v0.1 (Checked in)

Checking in MsgComposeCommands.js;
new revision: 1.365; previous revision: 1.364
done
Attachment #183852 - Attachment description: Patch v0.1 → Patch v0.1 (Checked in)
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Depends on: 296265
It looks like this caused bug 296265
Verified FIXED using build 2006-01-12-10 of SeaMonkey trunk under Windows XP.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: