Bug 83423 - disable as-you-type spell checking in all of KDE
Summary: disable as-you-type spell checking in all of KDE
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kspell (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Zack Rusin
URL:
Keywords:
: 92340 110573 120287 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-06-15 17:01 UTC by Thorsten Staerk
Modified: 2006-05-21 16:33 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
no spellcheck in konqueror (1.37 KB, patch)
2005-12-18 22:25 UTC, Thorsten Staerk
Details
allow setting "no spellcheck" in configuration (5.81 KB, patch)
2005-12-20 17:30 UTC, Thorsten Staerk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thorsten Staerk 2004-06-15 17:01:39 UTC
Version:            (using KDE KDE 3.2.2)
Installed from:    RedHat RPMs

please disable as-you-type spell checking per default. It is really annoying as it crashes often, makes mistakes, just looks ugly and when you see it the first time, you think of a bug in KDE, because you did not turn it on and you would rather expect some ~~~~~~ below a word.
While typing, some words flashed red and black again while writing. I was really thinking of a KDE bug first.

Please set the default to disabled very deep in KDE, so not only KMail is affected, but also e.g. konqueror's textareas.
Comment 1 Martin Piskernig 2004-10-09 10:51:00 UTC
I fully support this wishlist item. Please at least add an option to disable spell-checking in the control center!
Comment 2 Martin Piskernig 2004-10-09 11:29:25 UTC
A quick hackish way to disable spell checking is to edit $HOME/.kde/share/config/kdeglobals and in the [KSpell] section turn all values to 0.
Comment 3 Don Sanders 2004-10-27 09:11:23 UTC
On Saturday 09 October 2004 18:51, Martin Piskernig wrote:
> I fully support this wishlist item.

Please vote for it then. Currently this bug has zero votes which to me 
indicates that there is not much demand for disabling spell-checking 
by default.

Comment 4 Simon Perreault 2005-05-31 19:52:40 UTC
*** This bug has been confirmed by popular vote. ***
Comment 5 Joshua 2005-09-05 00:58:15 UTC
This should be a bug not a wish. I use textares a lot in my work (i.e. PHP MyAdmin query dumps, etc...) and this feature freezes my computer. It also makes typing slow down to about 10-20 wpm. Either make it work right or global disable it.
Comment 6 Simon Perreault 2005-09-05 04:39:38 UTC
Joshua is right, this is not a wishlist but rather a minor bug.
Comment 7 Øyvind Stegard 2005-12-17 07:06:13 UTC
I fully agree. There should be an option to disable this, and that should be on by default. I cannot find one in KDE 3.5.0. Right now I'm typing a mix of red and black words, just because my spell checking is per default configured for Norwegian, on my computers. Really annoying.

It's also sensitive to CPU, meaning if I've got heavy background tasks running, typing in Konqueror text areas is sluggish.
Comment 8 Morten O. Hansen 2005-12-17 07:57:13 UTC
If you start a new mail, you can go into Option -> Automatic Spellchecking and turn it off/on. Its not a good place to have it, but atleast it works.
Comment 9 Øyvind Stegard 2005-12-17 08:33:43 UTC
Reply to comment #8:
>If you start a new mail, you can go into Option -> Automatic Spellchecking
>and turn it off/on. Its not a good place to have it, but atleast it works. 
I've already done this, but it doesn't have have any effect for Konqueror text areas. I'm almost grateful it doesn't,  because that would be an awful place for options affecting other apps than Kmail itself.
Comment 10 Thorsten Staerk 2005-12-17 21:32:19 UTC
Reply to comment #8: 
>If you start a new mail, you can go into Option -> Automatic Spellchecking 
>and turn it off/on. Its not a good place to have it, but atleast it works. 
I know. It took me 2 hours to implement it - as Oyvind states, it is only kmail specific - while I am typing this, Oyvind, kmail and kspell are written red by kspell - a fact that I really dislike.
Thanks for your votes
Comment 11 Thorsten Staerk 2005-12-17 23:44:53 UTC
the relevant code is in 
kdelibs4_snapshot/kspell2/kcmspellchecking/spellchecking.cpp
Comment 12 Thorsten Staerk 2005-12-18 22:25:07 UTC
Created attachment 13977 [details]
no spellcheck in konqueror

okay, this patch disables spell checking in konqueror. Still to be refined:
1. think if there is a possibility to let the different dictionaries return
"correctly spelled" for every word
2. set up a global-config-setting or so saying "do spellcheck" and honor this
setting
Comment 13 Thorsten Staerk 2005-12-20 17:30:00 UTC
Created attachment 13998 [details]
allow setting "no spellcheck" in configuration

This preliminary patch allows you to set "do spellcheck" in kcontrol. Next step
must be that kspell looks at this setting and quits work if it is not set.
Comment 14 Thorsten Staerk 2006-01-07 20:04:00 UTC
SVN commit 495333 by tstaerk:

Allow to turn spellchecking on/off. Avoids one crash in KDE 4's
konqueror. 
This shall be forwardported to kdelibs.
CCBUGS:83423


 M  +45 -10    ksconfig.cpp  
 M  +9 -1      ksconfig.h  
 M  +41 -34    kspelldlg.cpp  
Comment 15 David Faure 2006-01-08 13:40:56 UTC
SVN commit 495495 by dfaure:

Forwardport 495333 by tstaerk, "Allow to turn spellchecking on/off", after
fixing the bool<->int conversions, but this doesn't change the fact that
those classes are deprecated in favour of kspell2, which means that khtml
should be ported to kspell2 [not this weekend though].
CCMAIL: Thorsten Staerk <dev@staerk.de>, 83423@bugs.kde.org


 M  +45 -10    ksconfig.cpp  
 M  +9 -1      ksconfig.h  
 M  +41 -34    kspelldlg.cpp  
Comment 16 Davor Cubranic 2006-01-22 11:32:10 UTC
I believe this bug is duplicated in at least bug 92340 (which has another 100 votes in it), 110573, and 120287.
Comment 17 Thiago Macieira 2006-01-23 09:47:59 UTC
*** Bug 92340 has been marked as a duplicate of this bug. ***
Comment 18 Thiago Macieira 2006-01-23 09:48:29 UTC
*** Bug 110573 has been marked as a duplicate of this bug. ***
Comment 19 Thiago Macieira 2006-01-23 09:48:54 UTC
*** Bug 120287 has been marked as a duplicate of this bug. ***
Comment 20 Logan Rathbone 2006-02-16 01:17:54 UTC
Uhh, some of you guys really need to read this:
http://ometer.com/free-software-ui.html
specifically on the "Standing up to user pressure" section...

Yes, I know this seems like a troll, but come on...
Comment 21 Thorsten Staerk 2006-05-20 13:47:39 UTC
SVN commit 542801 by tstaerk:

Give a possibility to disable SpellChecking already in KDE
3.5.3. To do it, set KSpell_DoSpellChecking=0 in the [KSpell] section of
kdeglobals.
BUGS:83423
CCBUGS:109389


 M  +24 -20    ksyntaxhighlighter.cpp  


--- branches/KDE/3.5/kdelibs/kdeui/ksyntaxhighlighter.cpp #542800:542801
@@ -334,28 +334,32 @@
 void KDictSpellingHighlighter::slotSpellReady( KSpell *spell )
 {
     kdDebug(0) << "KDictSpellingHighlighter::slotSpellReady( " << spell << " )" << endl;
-    if ( d->globalConfig ) {
-        connect( d->sDictionaryMonitor, SIGNAL( destroyed()),
-                 this, SLOT( slotDictionaryChanged() ));
-    }
-    if ( spell != d->spell )
+    KConfigGroup cg( KGlobal::config(),"KSpell" );
+    if ( cg.readEntry("KSpell_DoSpellChecking") != "0" )
     {
-        delete d->spell;
-        d->spell = spell;
+      if ( d->globalConfig ) {
+          connect( d->sDictionaryMonitor, SIGNAL( destroyed()),
+                   this, SLOT( slotDictionaryChanged() ));
+      }
+      if ( spell != d->spell )
+      {
+          delete d->spell;
+          d->spell = spell;
+      }
+      d->spellReady = true;
+      const QStringList l = KSpellingHighlighter::personalWords();
+      for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
+          d->spell->addPersonal( *it );
+      }
+      connect( spell, SIGNAL( misspelling( const QString &, const QStringList &, unsigned int )),
+	       this, SLOT( slotMisspelling( const QString &, const QStringList &, unsigned int )));
+      connect( spell, SIGNAL( corrected( const QString &, const QString &, unsigned int )),
+               this, SLOT( slotCorrected( const QString &, const QString &, unsigned int )));
+      d->checksRequested = 0;
+      d->checksDone = 0;
+      d->completeRehighlightRequired = true;
+      d->rehighlightRequest->start( 0, true );
     }
-    d->spellReady = true;
-    const QStringList l = KSpellingHighlighter::personalWords();
-    for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
-        d->spell->addPersonal( *it );
-    }
-    connect( spell, SIGNAL( misspelling( const QString &, const QStringList &, unsigned int )),
-	     this, SLOT( slotMisspelling( const QString &, const QStringList &, unsigned int )));
-    connect( spell, SIGNAL( corrected( const QString &, const QString &, unsigned int )),
-	     this, SLOT( slotCorrected( const QString &, const QString &, unsigned int )));
-    d->checksRequested = 0;
-    d->checksDone = 0;
-    d->completeRehighlightRequired = true;
-    d->rehighlightRequest->start( 0, true );
 }
 
 bool KDictSpellingHighlighter::isMisspelled( const QString &word )
Comment 22 Ingo Klöcker 2006-05-21 13:09:40 UTC
reopening just in order to be able to move it to the right product since this is obviously not a kmail specific report
Comment 23 Ingo Klöcker 2006-05-21 13:11:51 UTC
and closing again. sorry for the noise.
Comment 24 Thorsten Staerk 2006-05-21 16:33:36 UTC
see also
110835  please remove KMEdit::setSpellCheckingActive from kmail
109389  give a possibility to disable as-you-type spell checking