Closed
Bug 65677
Opened 25 years ago
Closed 24 years ago
pref UI: if no spellchecker installed, pref should be disabled
Categories
(SeaMonkey :: MailNews: Message Display, defect)
SeaMonkey
MailNews: Message Display
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9
People
(Reporter: bugzilla, Assigned: gerv)
Details
(Keywords: helpwanted, polish)
Attachments
(4 files)
1.36 KB,
patch
|
Details | Diff | Splinter Review | |
1.35 KB,
patch
|
Details | Diff | Splinter Review | |
1.54 KB,
patch
|
Details | Diff | Splinter Review | |
1.50 KB,
patch
|
Details | Diff | Splinter Review |
pls pardon if this is a dup --couldn't find an existing bug on this. occurs on
all platforms.
0. make sure your installation doesn't include the spellchecker --ie, the
components/spellchecker/ dir should not exist.
1. start app, open Preferences dialog.
2. open the Mail and Newsgroups > Message Composition panel.
observe: under the Composing Messages section, the "Check spelling before
sending is enabled --ie, you can select and deselect the checkbox.
expected: if there's no spellchecker, this feature should greyed out [disabled].
Assignee | ||
Comment 1•24 years ago
|
||
If someone said how to check whether the spellchecker was installed or not, I'm
sure someone could insert the logic into the JS for this without too much
trouble...
Gerv
Comment 2•24 years ago
|
||
gerv,
in nsMessengerMigrator.cpp I have code that sees if the 4.x addressbook upgrader
component is installed.
in C++, it's something like this:
nsCOMPtr <nsIAbUpgrader> abUpgrader = do_GetService(NS_AB4xUPGRADER_CONTRACTID,
&rv);
if (NS_FAILED(rv) || !abUpgrader) return;
you could do the same thing from JS for spell checker.
(see what they are doing in nsEditorShell::InitSpellChecker())
Assignee | ||
Comment 3•24 years ago
|
||
Seth, I have no idea how to express that idea in JS :-(
In all seriousness, surely this should just be disabled in Mozilla? If Netscape
want to add a spell checker, they'll have to re-enable it in their builds. ;-)
For reference:
http://lxr.mozilla.org/seamonkey/source/mailnews/compose/prefs/resources/content
/pref-messages.xul#66
is the location of the XUL for the offending item.
(This file does not have an associated .js file so we'd have to create one to
contain the logic if we greyed it out dynamically.)
Gerv
Assignee | ||
Comment 4•24 years ago
|
||
OK - patch coming up :-) It's five lines, and it really _should_ work, but I
can't test it properly because I don't have access to a build with spellchecker
installed :-)
Could I get some review, please? :-)
Gerv
Assignee | ||
Comment 5•24 years ago
|
||
Assignee | ||
Comment 6•24 years ago
|
||
Comment 7•24 years ago
|
||
looking good.
two comments:
before setting disabled to false, I think you should QI to see that what you got
really is an nsISpellChecker.
did you need help testing this code, to see if we do the right thing, when a
spell checker is installed?
Assignee | ||
Comment 8•24 years ago
|
||
> before setting disabled to false, I think you should QI to see that what
> you got really is an nsISpellChecker.
Can't I trust the call to return an nsISpellChecker or null? <shrug>. Could you
provide a sample line or a doc? I don't know much about QueryInterface...
> did you need help testing this code, to see if we do the right thing,
> when a spell checker is installed?
Indeed. I cribbed the code from somewhere in Mail/News, so it really should
work, but whoever checks it in should probably test it first :-)
Gerv
Comment 9•24 years ago
|
||
here's how I'd alter your patch
var spellChecker;
try {
spellChecker = Components.classes["@mozilla.org/
spellchecker;1"].QueryInterface(Components.interfaces.nsISpellChecker);
}
catch (ex) {
spellChecker = null;
}
if (spellChecker) {
// enable the UI
}
can you create a new patch, like that?
then I'll try it out my tree (with the spell checker built and installed, and
without)
thanks work doing this, gerv. do you want to re-assign the bug to you?
Assignee | ||
Comment 10•24 years ago
|
||
Assignee | ||
Comment 11•24 years ago
|
||
Attempt 3 attached, incorporating comments from sspitzer. Give it a go :-)
Gerv
Assignee: sspitzer → gervase.markham
Target Milestone: --- → mozilla0.9
Comment 12•24 years ago
|
||
update: sorry gerv, didn't get to it today. I'll do it tomorrow (3/28)
Comment 13•24 years ago
|
||
Comment 14•24 years ago
|
||
note, I couldn't do a create instance, since nsISpellChecker is not scriptable.
but gerv's original way worked fine for now. I've tested and it all works.
ideally, nsISpellChecker should be made scriptable. I'll log another bug for
that.
thanks again gerv.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 15•24 years ago
|
||
If you do that, and re-fix this, you'll also need to update the code in the
place I nicked it from - I think it was the bit that enabled or disabled the
SpellCheck button.
Gerv
Comment 16•23 years ago
|
||
verified because the pref is no longer visible when a spell checker is not
installed see bug 84607, verified on 3-29-2002.
Status: RESOLVED → VERIFIED
Updated•21 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•