evolution-data-server r8449 - trunk/camel
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r8449 - trunk/camel
- Date: Fri, 1 Feb 2008 08:52:48 +0000 (GMT)
Author: mcrha
Date: Fri Feb 1 08:52:47 2008
New Revision: 8449
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8449&view=rev
Log:
2008-02-01 Milan Crha <mcrha redhat com>
** Fix for bug #211353
* camel-filter-driver.c: (do_label):
Use new label tags when setting old tags.
Modified:
trunk/camel/ChangeLog
trunk/camel/camel-filter-driver.c
Modified: trunk/camel/camel-filter-driver.c
==============================================================================
--- trunk/camel/camel-filter-driver.c (original)
+++ trunk/camel/camel-filter-driver.c Fri Feb 1 08:52:47 2008
@@ -590,11 +590,26 @@
d(fprintf (stderr, "setting label tag\n"));
if (argc > 0 && argv[0]->type == ESEXP_RES_STRING) {
+ /* This is a list of new labels, we should used these in case of passing in old names.
+ This all is required only because backward compatibility. */
+ const char *new_labels[] = { "$Labelimportant", "$Labelwork", "$Labelpersonal", "$Labeltodo", "$Labellater", NULL};
+ const char *label;
+ int i;
+
+ label = argv[0]->value.string;
+
+ for (i = 0; new_labels [i]; i++) {
+ if (label && strcmp (new_labels [i] + 6, label) == 0) {
+ label = new_labels [i];
+ break;
+ }
+ }
+
if (p->source && p->uid && camel_folder_has_summary_capability (p->source))
- camel_folder_set_message_user_flag (p->source, p->uid, argv[0]->value.string, TRUE);
+ camel_folder_set_message_user_flag (p->source, p->uid, label, TRUE);
else
- camel_message_info_set_user_flag (p->info, argv[0]->value.string, TRUE);
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Set label to %s", argv[0]->value.string);
+ camel_message_info_set_user_flag (p->info, label, TRUE);
+ camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Set label to %s", label);
}
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]