Closed Bug 278310 Opened 15 years ago Closed 15 years ago

Inline Spell Check Front End for compose

Categories

(Thunderbird :: Message Compose Window, defect)

defect
Not set

Tracking

(Not tracked)

VERIFIED FIXED
Thunderbird1.1

People

(Reporter: mscott, Assigned: mscott)

References

Details

Attachments

(4 files, 2 obsolete files)

Breaking out from 58612.
Status: NEW → ASSIGNED
Target Milestone: --- → Thunderbird1.1
Attached patch mail front end changes (obsolete) — Splinter Review
First cut of the mail FE changes to support inline spell checking.

1) Adds a preferences box to the composition options dialog for a global mail
inline spell check setting.

2) Adds a local override menu item to the options menu in a mail compose window
for overriding the global value.

3) Inserts suggested mispellings at the start of the mail compose context menu
for a misplled word. Adds menu items for Ignore Word and Add to Dictionary to
this context menu. I also made it show "No Suggestions" in the context menu if
there are no suggestions for the mispelled word.

4) I'd like to come up with a better menu item than: "Check Spelling As You
Type" in the compose window menu which is a bit too long but is consistant with
the "Check Spelling" menu item above it.
Attached image screenshots
One of the side effects of this patch is the time it takes to open a new compose
window (at least the first one anyway). We now have to load the dictionary when
we load the compose window because you are going to need the dictionary as soon
as you start typing something. At least in a debug build I can see a noticeable
pause before the window finishes loading while the dictionary is loaded. 
Attached patch mail front end changes (obsolete) — Splinter Review
Attachment #171211 - Attachment is obsolete: true
Would it be preferable to have a wavy underline, such as the one in the Inline
SpellChecker Extension found here: http://www.supportware.net/mozilla/#ext8..

I'd be happy to contribute if required, as I created the styles for it..
Comment on attachment 171313 [details] [diff] [review]
mail front end changes

>+++ components/compose/content/MsgComposeCommands.js	15 Jan 2005 01:41:26 -0000
>@@ -599,6 +599,23 @@
>   } catch(e) {}
> }
> 
>+function openEditorContextMenu() {

Would it be wise to wrap this in a check if inline spelling is enabled or not,
or is that already done elsewhere (I couldn't find it) ?

>+        InlineSpellChecker.Init(gMsgCompose.editor, sPrefs.getBoolPref("mail.spellcheck.inline"));

I couldn't find out where InlineSpellChecker is created, so I was unable to
check this, but does it load the dictionary if the pref is disabled ?

I don't know my way around this code, so my questions could be quite foolish :)
If you know how to modify the spell check selection frame code to draw a
squiggly line then by all means go for it Dan. Note: the spell check selection
frame is not controlled via CSS so your background image hack won't work for our
implementation.  See: 

http://lxr.mozilla.org/mozilla/source/layout/generic/nsTextFrame.cpp#1968

for where we paint the spell check selection frame
1) Adds preferences UI for enabling inline spell checker (defaults to off)
2) context menu support to list mispellings of a word followed by Add Word and
Ignore Word options for the editor context menu when selection is on a
mispelled word.
3) Note: there is no impact at startup if the user does not have the inline
spell checker turned on. .checkDocument and spellChecker.Init do nothing if
spell checking isn't enabled where 'nothing' includes not loading the
dictionary file.
4) still searching for better compose menu item text than "Check Spelling As
You Type" which is pretty long for a menu item.
Attachment #171313 - Attachment is obsolete: true
Attachment #173115 - Flags: superreview?(bienvenu)
Attachment #173115 - Flags: superreview?(bienvenu) → superreview+
My Open Office broken.  But, I think they call it Auto Spell or Auto Spellcheck
or something...  
WordPerfect (still the best text program) calls it "Spell-As-You-Go".

OpenOffice's tooltip calls it: "AutoSpellcheck".
Thanks for the tips. I'm going to try out "Spell As You Type" for the menu item.

This is now checked in. 
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Blocks: inlineSpell
vrfy'd fixed with recent trunk builds on all OS's. the menu item is Options |
Spell As You Type.

works nicely!
Status: RESOLVED → VERIFIED
OS: Windows XP → All
Hardware: PC → All
You need to log in before you can comment on or make changes to this bug.