[evolution-patches] 35219, followup not cleared properly
- From: Not Zed <notzed ximian com>
- To: asdf <evolution-patches lists ximian com>
- Subject: [evolution-patches] 35219, followup not cleared properly
- Date: Mon, 21 Feb 2005 17:40:49 +0800
also includes fixes toward deprecating the folder_user_tag api.
? mail/ems.diff
? mail/evolution-mail-2.0.schemas
? mail/m.diff
? mail/ma.diff
? mail/default/zh_CN/Makefile
? mail/default/zh_CN/Makefile.in
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3577
diff -u -p -r1.3577 ChangeLog
--- mail/ChangeLog 21 Feb 2005 06:37:13 -0000 1.3577
+++ mail/ChangeLog 21 Feb 2005 09:44:23 -0000
@@ -1,3 +1,13 @@
+2005-02-21 Not Zed <NotZed Ximian com>
+
+ ** See bug #35219
+
+ * em-utils.c (em_utils_flag_for_followup_clear): clear the flag
+ tags rather than setting them to "". Also change to using newer
+ messageinfo api.
+ (tag_editor_response, em_utils_flag_for_followup)
+ (em_utils_flag_for_followup_completed): some cleanup/api stuff.
+
2005-02-14 Not Zed <NotZed Ximian com>
** See bug #61363 & e-util/ChangeLog
Index: mail/em-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-utils.c,v
retrieving revision 1.56
diff -u -p -r1.56 em-utils.c
--- mail/em-utils.c 18 Jan 2005 05:32:19 -0000 1.56
+++ mail/em-utils.c 21 Feb 2005 09:44:24 -0000
@@ -639,8 +639,14 @@ tag_editor_response (GtkWidget *dialog,
camel_folder_freeze (folder);
for (i = 0; i < uids->len; i++) {
- for (t = tags; t; t = t->next)
- camel_folder_set_message_user_tag (folder, uids->pdata[i], t->name, t->value);
+ CamelMessageInfo *mi = camel_folder_get_message_info(folder, uids->pdata[i]);
+
+ if (mi) {
+ for (t = tags; t; t = t->next)
+ camel_message_info_set_user_tag(mi, t->name, t->value);
+
+ camel_message_info_free(mi);
+ }
}
camel_folder_thaw (folder);
@@ -685,9 +691,12 @@ em_utils_flag_for_followup (GtkWidget *p
CamelMessageInfo *info;
info = camel_folder_get_message_info (folder, uids->pdata[i]);
- message_tag_followup_append_message (MESSAGE_TAG_FOLLOWUP (editor),
- camel_message_info_from (info),
- camel_message_info_subject (info));
+ if (info) {
+ message_tag_followup_append_message (MESSAGE_TAG_FOLLOWUP (editor),
+ camel_message_info_from (info),
+ camel_message_info_subject (info));
+ camel_message_info_free(info);
+ }
}
/* special-case... */
@@ -700,7 +709,7 @@ em_utils_flag_for_followup (GtkWidget *p
if (tags)
message_tag_editor_set_tag_list (MESSAGE_TAG_EDITOR (editor), tags);
- camel_folder_free_message_info (folder, info);
+ camel_message_info_free(info);
}
}
@@ -729,9 +738,14 @@ em_utils_flag_for_followup_clear (GtkWid
camel_folder_freeze (folder);
for (i = 0; i < uids->len; i++) {
- camel_folder_set_message_user_tag (folder, uids->pdata[i], "follow-up", "");
- camel_folder_set_message_user_tag (folder, uids->pdata[i], "due-by", "");
- camel_folder_set_message_user_tag (folder, uids->pdata[i], "completed-on", "");
+ CamelMessageInfo *mi = camel_folder_get_message_info(folder, uids->pdata[i]);
+
+ if (mi) {
+ camel_message_info_set_user_tag(mi, "follow-up", NULL);
+ camel_message_info_set_user_tag(mi, "due-by", NULL);
+ camel_message_info_set_user_tag(mi, "completed-on", NULL);
+ camel_message_info_free(mi);
+ }
}
camel_folder_thaw (folder);
@@ -762,12 +776,14 @@ em_utils_flag_for_followup_completed (Gt
camel_folder_freeze (folder);
for (i = 0; i < uids->len; i++) {
const char *tag;
-
- tag = camel_folder_get_message_user_tag (folder, uids->pdata[i], "follow-up");
- if (tag == NULL || *tag == '\0')
- continue;
-
- camel_folder_set_message_user_tag (folder, uids->pdata[i], "completed-on", now);
+ CamelMessageInfo *mi = camel_folder_get_message_info(folder, uids->pdata[i]);
+
+ if (mi) {
+ tag = camel_message_info_user_tag(mi, "follow-up");
+ if (tag && tag[0])
+ camel_message_info_set_user_tag(mi, "completed-on", now);
+ camel_message_info_free(mi);
+ }
}
camel_folder_thaw (folder);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]