[evolution-patches] patch for 45818



Hi All,

	Pl. find the patch for 45818:  i18n mail messages search only produces 
'[?]'. The find button functionallity which is supposed to highlight each item 
inturn is broken for multibyte items due to bug in gtkhtml.
	
	
Thanks & Regards,
Suresh
? ChangeLog-2003-08-13-1634
? break
? e-searching-tokenizer.c.changed
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.2761.2.11
diff -u -r1.2761.2.11 ChangeLog
--- ChangeLog	5 Aug 2003 21:38:19 -0000	1.2761.2.11
+++ ChangeLog	14 Aug 2003 00:28:53 -0000
@@ -1,3 +1,10 @@
+2003-08-13  Suresh Chandrasekharan <suresh chandrasekharan sun com>
+
+	* e-searching-tokenizer.c (searcher_next_token): Fix for 45818 ( i18n
+	mail messages search only produces '[?]'). Now multibyte character
+	selection works correctly. But due to associated gtkhtml bug, the find
+	button functionallity for multibyte character is broken.
+
 2003-08-05  Not Zed  <NotZed Ximian com>
 
 	** See bug #47224.  Hook onto clicked rather than button_pressed,
Index: e-searching-tokenizer.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/e-searching-tokenizer.c,v
retrieving revision 1.16
diff -u -r1.16 e-searching-tokenizer.c
--- e-searching-tokenizer.c	6 Mar 2003 15:32:24 -0000	1.16
+++ e-searching-tokenizer.c	14 Aug 2003 00:28:54 -0000
@@ -717,7 +717,7 @@
 searcher_next_token(struct _searcher *s)
 {
 	struct _token *token;
-	char *tok, *stok;
+	char *tok, *stok, *pre_tok;
 	struct _trie *t = s->t;
 	struct _state *q = s->state;
 	struct _match *m = NULL;
@@ -753,7 +753,7 @@
 		}
 
 		/* process whole token */
-		stok = tok;
+		pre_tok = stok = tok;
 		while ((c = camel_utf8_getc((const unsigned char **)&tok))) {
 			if ((s->flags & SEARCH_CASE) == 0)
 				c = g_unichar_tolower(c);
@@ -765,7 +765,7 @@
 				q = &t->root;
 			} else if (m != NULL) {
 				/* keep track of previous offsets of utf8 chars, rotating buffer */
-				s->last[s->lastp] = s->offset + (tok-stok)-1;
+				s->last[s->lastp] = s->offset + (pre_tok-stok);
 				s->lastp = (s->lastp+1)&s->last_mask;
 
 				q = m->match;
@@ -798,9 +798,10 @@
 					}
 				}
 			}
+			pre_tok = tok;
 		}
 
-		s->offset += (tok-stok)-1;
+		s->offset += (pre_tok-stok);
 
 		flush_extra(s);
 	}


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