[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Patch for kspell
From:       John Tapsell <john () geola ! co ! uk>
Date:       2005-07-31 19:58:57
Message-ID: 200507312058.57935.john () geola ! co ! uk
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


Hi!

  It's really annoying when a textedit says too many misspelt words and turns 
off when you have only written 1 or 2 words!  So I wrote a patch..  After 
discussing with the others, we agree a default of 100 words minimum before it 
can be disabled.

Can I apply to trunk and kde3.5 ?

Thanks!
JohnFlux

["spell.patch" (text/x-diff)]

Index: ksyntaxhighlighter.cpp
===================================================================
--- ksyntaxhighlighter.cpp	(revision 441707)
+++ ksyntaxhighlighter.cpp	(working copy)
@@ -104,6 +104,7 @@
     int wordCount, errorCount;
     int checksRequested, checksDone;
     int disablePercentage;
+    int disableWordCount;
     bool completeRehighlightRequired;
     bool active, automatic, autoReady;
     bool globalConfig, spellReady;
@@ -295,6 +296,7 @@
     KConfigGroupSaver cs( config, "KSpell" );
     d->disablePercentage = config->readNumEntry( "KSpell_AsYouTypeDisablePercentage", 42 );
     d->disablePercentage = QMIN( d->disablePercentage, 101 );
+    d->disableWordCount = config->readNumEntry( "KSpell_AsYouTypeDisableWordCount", 100 );
 
     textEdit->installEventFilter( this );
     textEdit->viewport()->installEventFilter( this );
@@ -567,7 +569,7 @@
 
     if ( d->automatic ) {
 	// tme = Too many errors
-	bool tme = d->errorCount * 100 >= d->disablePercentage * d->wordCount;
+	bool tme = d->wordCount >= d->disableWordCount && d->errorCount * 100 >= d->disablePercentage * d->wordCount;
 	if ( d->active && tme )
 	    d->active = false;
 	else if ( !d->active && !tme )

[Attachment #8 (application/pgp-signature)]

 =

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscrib=
e <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic