Re: [evolution-patches] patch to fix bug #59158: new vfolder does not take effect




Hmm, i don't think this is correct.

The vfolder stuff shouldn't really care about the source at all.  It might be another bug elsewhere in the code in mail-vfolder that is causing this issue.

e.g. perhaps mail-vfolder.c:rule_changed should be checking rule->with rather than rule->source

But as it stands, I think this patch is just hiding the problem rather than fixing it.

Michael

On Thu, 2004-05-27 at 18:23 -0400, Bruce Tao wrote:
Hi, everyone

Before adding the new-created vfolder-rule to the rule-context, its 
"source" member variable is null. That's the reason why the folder shows 
nothing. At the mean time, the new rule is saved into the "vfolders.xml" 
file, during which the "source" member is set "incoming" by default. So 
after restarting evolution and load rule-context from "vfolders.xml", 
things go right.

Would anyone please take a look at this patch? It's pretty simple.  Thanks!

-regards from Bruce Tao
Plain text document attachment (patch)
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3093
diff -u -r1.3093 ChangeLog
--- mail/ChangeLog	11 Feb 2004 21:53:56 -0000	1.3093
+++ mail/ChangeLog	27 May 2004 09:06:29 -0000
@@ -1,3 +1,10 @@
+2004-05-27  Bruce Tao  <bruce tao sun com>
+                                                                                                                             
+        * mail-vfolder.c: (new_rule_clicked):
+        Give the value "incoming" to variable "source" of the new-added
+        rule before adding it to the rule-context. This is coordinated
+        to the context-saving process.
+
 2004-02-11  Jeffrey Stedfast  <fejj ximian com>
 
 	* mail-component.c (mail_control_new): Disable the
Index: mail/mail-vfolder.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-vfolder.c,v
retrieving revision 1.116
diff -u -r1.116 mail-vfolder.c
--- mail/mail-vfolder.c	5 Feb 2004 05:14:59 -0000	1.116
+++ mail/mail-vfolder.c	27 May 2004 09:06:34 -0000
@@ -993,6 +993,8 @@
 		char *user;
 		FilterRule *rule = g_object_get_data((GObject *)w, "rule");
 
+		rule->source = g_strdup("incoming");
+
 		if (!filter_rule_validate(rule)) {
 			/* no need to popup a dialog because the validate code does that. */
 			return;
Michael Zucchi <notzed ximian com>

Ximian Evolution and Free Software Developer


Novell, Inc.


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