aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorHans Petter <hansp@src.gnome.org>2003-09-12 06:04:44 +0800
committerHans Petter <hansp@src.gnome.org>2003-09-12 06:04:44 +0800
commit697761cc337aa77a47140c8df50ed84bc25e23f6 (patch)
treeb785830f72e9938cceaa016a419c7b6d9892bada /calendar/gui
parent733d77e657516f9a59b5c1a7b62acb87b03ec86f (diff)
downloadgsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar
gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar.gz
gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar.bz2
gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar.lz
gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar.xz
gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar.zst
gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.zip
Import new libical from mainline HEAD and make appropriate changes to
Evolution. svn path=/trunk/; revision=22538
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/e-cal-model-calendar.c20
-rw-r--r--calendar/gui/e-cal-model-tasks.c6
-rw-r--r--calendar/gui/e-cal-model.c17
3 files changed, 28 insertions, 15 deletions
diff --git a/calendar/gui/e-cal-model-calendar.c b/calendar/gui/e-cal-model-calendar.c
index 73ecaf3e94..82de4e6d5a 100644
--- a/calendar/gui/e-cal-model-calendar.c
+++ b/calendar/gui/e-cal-model-calendar.c
@@ -128,7 +128,7 @@ get_dtend (ECalModelComponent *comp_data)
/* FIXME: handle errors */
cal_client_get_timezone (comp_data->client,
- icaltimezone_get_tzid (icaltimezone_get_builtin_timezone (tt_end.zone)),
+ icaltime_get_tzid (tt_end),
&zone);
comp_data->dtend->zone = zone;
}
@@ -155,12 +155,14 @@ get_transparency (ECalModelComponent *comp_data)
prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_TRANSP_PROPERTY);
if (prop) {
- const char *transp;
+ icalproperty_transp transp;
transp = icalproperty_get_transp (prop);
- if (strcasecmp (transp, "TRANSPARENT") == 0)
+ if (transp == ICAL_TRANSP_TRANSPARENT ||
+ transp == ICAL_TRANSP_TRANSPARENTNOCONFLICT)
return _("Free");
- else if (strcasecmp (transp, "OPAQUE") == 0)
+ else if (transp == ICAL_TRANSP_OPAQUE ||
+ transp == ICAL_TRANSP_OPAQUENOCONFLICT)
return _("Busy");
}
@@ -251,12 +253,12 @@ set_transparency (ECalModelComponent *comp_data, const void *value)
icalproperty_free (prop);
}
} else {
- const char *transp;
+ icalproperty_transp transp;
- if (strcasecmp (value, "FREE"))
- transp = "TRANSPARENT";
- else if (strcasecmp (value, "OPAQUE"))
- transp = "OPAQUE";
+ if (!strcasecmp (value, "FREE"))
+ transp = ICAL_TRANSP_TRANSPARENT;
+ else if (!strcasecmp (value, "OPAQUE"))
+ transp = ICAL_TRANSP_OPAQUE;
else {
if (prop) {
icalcomponent_remove_property (comp_data->icalcomp, prop);
diff --git a/calendar/gui/e-cal-model-tasks.c b/calendar/gui/e-cal-model-tasks.c
index deeb341512..6bca52586c 100644
--- a/calendar/gui/e-cal-model-tasks.c
+++ b/calendar/gui/e-cal-model-tasks.c
@@ -222,7 +222,7 @@ get_completed (ECalModelComponent *comp_data)
/* FIXME: handle errors */
cal_client_get_timezone (comp_data->client,
- icaltimezone_get_tzid (icaltimezone_get_builtin_timezone (tt_completed.zone)),
+ icaltime_get_tzid (tt_completed),
&zone);
comp_data->completed->zone = zone;
}
@@ -252,7 +252,7 @@ get_due (ECalModelComponent *comp_data)
/* FIXME: handle errors */
cal_client_get_timezone (comp_data->client,
- icaltimezone_get_tzid (icaltimezone_get_builtin_timezone (tt_due.zone)),
+ icaltime_get_tzid (tt_due),
&zone);
comp_data->due->zone = zone;
}
@@ -398,7 +398,7 @@ get_due_status (ECalModelTasks *model, ECalModelComponent *comp_data)
} else {
/* Get the current time in the same timezone as the DUE date.*/
status = cal_client_get_timezone (comp_data->client,
- icaltimezone_get_tzid (icaltimezone_get_builtin_timezone (due_tt.zone)),
+ icaltime_get_tzid (due_tt),
&zone);
if (status != CAL_CLIENT_GET_SUCCESS)
return E_CAL_MODEL_TASKS_DUE_FUTURE;
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index 1f2e4a8f13..8a68cd07e5 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -336,7 +336,7 @@ get_dtstart (ECalModel *model, ECalModelComponent *comp_data)
/* FIXME: handle errors */
cal_client_get_timezone (comp_data->client,
- icaltimezone_get_tzid (icaltimezone_get_builtin_timezone (tt_start.zone)),
+ icaltime_get_tzid (tt_start),
&zone);
comp_data->dtstart->zone = zone;
}
@@ -476,11 +476,22 @@ set_classification (ECalModelComponent *comp_data, const char *value)
icalproperty_free (prop);
}
} else {
+ icalproperty_class ical_class;
+
+ if (!strcasecmp (value, "PUBLIC"))
+ ical_class = ICAL_CLASS_PUBLIC;
+ else if (!strcasecmp (value, "PRIVATE"))
+ ical_class = ICAL_CLASS_PRIVATE;
+ else if (!strcasecmp (value, "CONFIDENTIAL"))
+ ical_class = ICAL_CLASS_CONFIDENTIAL;
+ else
+ ical_class = ICAL_CLASS_NONE;
+
if (!prop) {
- prop = icalproperty_new_class (value);
+ prop = icalproperty_new_class (ical_class);
icalcomponent_add_property (comp_data->icalcomp, prop);
} else
- icalproperty_set_class (prop, value);
+ icalproperty_set_class (prop, ical_class);
}
}