Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Need to override SpellCheckBeforeSend in TB extension

6 views
Skip to first unread message

Jonathan Kamens

unread,
Apr 18, 2011, 4:40:22 PM4/18/11
to
Hi all,

My Thunderbird extension needs to be able to selectively (on a
per-composition basis) disable the spell check that happens
immediately before a message is sent, after the user executes
the Send command.

This spell check is invoked from GenericSendMessage and is
controlled by the mail.SpellCheckBeforeSend preference.

It would obviously be a bad idea for my extension to change
the value of a user preference, but I can't see any other way
to disable the spell check while a particular message is being
sent.

I think making this work would actually require a TB core
change, something like this...

1. Modify GenericSendMessage to check if there's a
disableSpellCheckBeforeSend attribute on the message compose
window set to true, and if so, don't run the spell check.

2. Modify the code that pops up a message compose window so
that the disableSpellCheckBeforeSend attribute is removed if
it exists (to avoid inadvertently suppressing the spell check
with a compose window is reused).

Are there any TB developers here with commit privileges who
think this is a reasonable change and would review and commit
it if I submitted a patch?

David Bienvenu

unread,
Apr 18, 2011, 8:28:23 PM4/18/11
to
Hi Jonathan,
asuth might have a better suggestion, but yeah, I agree that some sort of change to MsgComposeCommands.js would make this a lot easier. An attribute could work, or
instead of directly checking "mail.SpellCheckBeforeSend", we could wrap that in a function, and you could override that function to do whatever checks you want in your
extension.

- David

0 new messages