[PATCH] Support for multiple languages in KDictSpellingHighlighter

Ingo Klöcker kloecker at kde.org
Sun Oct 19 22:23:19 BST 2003


Hi,

the patches do the following.

ksconfig.diff:
KSpellConfig::fillDicts( QComboBox *box ) fills a combo box with the 
available dictionaries. But it doesn't set the currently used 
dictionary as current item of the combo box. This patch fixes this bug. 
It's a bug because there is no other way to set the correct current 
item because the user of KSpellConfig only knows about the human 
readable dictionary names but not about the internal dictionary names. 
Without this fix fillDicts is completely useless.

ksyntaxhighlighter.diff:
Currently KDictSpellingHighlighter (the class that's for example used in 
KMail for as-you-type spell checking) has a static cache for already 
checked words and uses the global KSpellConfig. In order to be able to 
compose two messages in different languages at the same time in KMail 
it's necessary to add support for a custom KSpellConfig to 
KDictSpellingHighlighter. Furthermore the static cache is useless for 
multiple languages. Therefore this patch makes KDictSpellingHighlighter 
use a non-static cache in case a custom KSpellConfig is provided.

With those two patches in kdelibs it was quite easy to add a language 
selection box to KMail's composer (which is a must for multilingual 
users).

Regards,
Ingo

P.S.: If the signature on this message is broken then it's most likely 
mailmans fault.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ksyntaxhighlighter.diff
Type: text/x-diff
Size: 7083 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20031019/d3678013/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ksconfig.diff
Type: text/x-diff
Size: 634 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20031019/d3678013/attachment-0001.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20031019/d3678013/attachment.sig>


More information about the kde-core-devel mailing list