gtkhtml r9024 - trunk/components/editor



Author: mbarnes
Date: Thu Oct  9 13:26:00 2008
New Revision: 9024
URL: http://svn.gnome.org/viewvc/gtkhtml?rev=9024&view=rev

Log:
2008-10-09  Matthew Barnes  <mbarnes redhat com>

	** Fixes bug #548540 and #554424

	* components/editor/gtkhtml-editor.c (editor_method_check_word):
	A word is correct if it's found in ANY dictionary, not ALL.

	* components/editor/gtkhtml-spell-checker.c
	(gtkhtml_spell_checker_check_word):
	Exclude apostrophies from the end of words before passing them
	to the dictionary.



Modified:
   trunk/components/editor/ChangeLog
   trunk/components/editor/gtkhtml-editor.c
   trunk/components/editor/gtkhtml-spell-checker.c

Modified: trunk/components/editor/gtkhtml-editor.c
==============================================================================
--- trunk/components/editor/gtkhtml-editor.c	(original)
+++ trunk/components/editor/gtkhtml-editor.c	Thu Oct  9 13:26:00 2008
@@ -239,12 +239,12 @@
                           gpointer user_data)
 {
 	GtkhtmlEditor *editor = user_data;
-	gboolean correct = TRUE;
+	gboolean correct = FALSE;
 	GList *list;
 
 	list = editor->priv->active_spell_checkers;
 
-	while (list != NULL && correct) {
+	while (list != NULL && !correct) {
 		GtkhtmlSpellChecker *checker = list->data;
 
 		correct = gtkhtml_spell_checker_check_word (checker, word, -1);

Modified: trunk/components/editor/gtkhtml-spell-checker.c
==============================================================================
--- trunk/components/editor/gtkhtml-spell-checker.c	(original)
+++ trunk/components/editor/gtkhtml-spell-checker.c	Thu Oct  9 13:26:00 2008
@@ -306,6 +306,10 @@
 	if (spell_checker_is_digit (word, length))
 		return TRUE;
 
+	/* Exclude apostrophies from the end of words. */
+	while (word[length - 1] == '\'')
+		length--;
+
 	result = enchant_dict_check (dict, word, length);
 
 	if (result < 0)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]