[evolution-patches] #55579: Search is buggy and not usable.



hi, please see this bug
    http://bugzilla.ximian.com/show_bug.cgi?id=55579


This a bug of filter_rule_clone.
When we invoke the "advanced search" dialog, we use g_object_set_data_full to band a rule to the dialog on creating it. the rule banded with the dialog is a clone
of  efb->current_query. we use this bit of code to do it:
    rule = filter_rule_clone (efb->current_query);
but there is a problem in filter_rule_clone.
because when we copy a the parts of a rule, the pointers of parts are copied but the actual data isn't.
so this cause the current result:
for example after we select the "not contain" menu item, the current query is changed too.
As a result, when clicking the "clear" button...

Regards

Bill
Index: filter-rule.c
===================================================================
RCS file: /cvs/gnome/evolution/filter/filter-rule.c,v
retrieving revision 1.57
diff -u -r1.57 filter-rule.c
--- filter-rule.c	11 Apr 2003 19:11:50 -0000	1.57
+++ filter-rule.c	15 Mar 2004 03:26:35 -0000
@@ -436,7 +436,9 @@
 	
 	node = src->parts;
 	while (node) {
-		FilterPart *part = node->data;
+		FilterPart *part;
+		part = filter_part_clone (node->data);
+		filter_part_copy_values (part, node->data);
 		
 		g_object_ref (part);
 		dest->parts = g_list_append (dest->parts, part);


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