aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/conduits/todo
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-10-18 06:01:06 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-10-18 06:01:06 +0800
commit4ddd273ac4fc4dfa9c0b66e740801b16b691c2c1 (patch)
treeaa562952bc21be9cded0a0d90513829d13ca434b /calendar/conduits/todo
parent8d859008223995a32e606838fc4dedd8893647d3 (diff)
downloadgsoc2013-evolution-4ddd273ac4fc4dfa9c0b66e740801b16b691c2c1.tar.gz
gsoc2013-evolution-4ddd273ac4fc4dfa9c0b66e740801b16b691c2c1.tar.zst
gsoc2013-evolution-4ddd273ac4fc4dfa9c0b66e740801b16b691c2c1.zip
translate 1-5 priorites to 1-9 priorities better
2001-10-17 JP Rosevear <jpr@ximian.com> * conduits/todo/todo-conduit.c (local_record_from_comp): translate 1-5 priorites to 1-9 priorities better (comp_from_remote_record): ditto svn path=/trunk/; revision=13736
Diffstat (limited to 'calendar/conduits/todo')
-rw-r--r--calendar/conduits/todo/todo-conduit.c38
1 files changed, 34 insertions, 4 deletions
diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c
index c073b22eb0..e2256904c6 100644
--- a/calendar/conduits/todo/todo-conduit.c
+++ b/calendar/conduits/todo/todo-conduit.c
@@ -433,10 +433,22 @@ local_record_from_comp (EToDoLocalRecord *local, CalComponent *comp, EToDoCondui
}
cal_component_get_priority (comp, &priority);
- if (priority) {
- local->todo->priority = *priority;
+ if (priority && *priority != 0) {
+ if (*priority <= 3)
+ local->todo->priority = 1;
+ else if (*priority == 4)
+ local->todo->priority = 2;
+ else if (*priority == 5)
+ local->todo->priority = 3;
+ else if (*priority <= 7)
+ local->todo->priority = 4;
+ else
+ local->todo->priority = 5;
+
cal_component_free_priority (priority);
- }
+ } else {
+ local->todo->priority = 3;
+ }
cal_component_get_classification (comp, &classif);
@@ -485,6 +497,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
CalComponentText summary = {NULL, NULL};
CalComponentDateTime dt = {NULL, icaltimezone_get_tzid (timezone)};
struct icaltimetype due;
+ int priority;
char *txt;
g_return_val_if_fail (remote != NULL, NULL);
@@ -533,8 +546,25 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
dt.value = &due;
cal_component_set_due (comp, &dt);
}
+
+ switch (todo.priority) {
+ case 1:
+ priority = 3;
+ break;
+ case 2:
+ priority = 4;
+ break;
+ case 3:
+ priority = 5;
+ break;
+ case 4:
+ priority = 7;
+ break;
+ default:
+ priority = 9;
+ }
- cal_component_set_priority (comp, &todo.priority);
+ cal_component_set_priority (comp, &priority);
cal_component_set_transparency (comp, CAL_COMPONENT_TRANSP_NONE);
if (remote->attr & dlpRecAttrSecret)