aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/tag-calendar.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-06-14 14:54:20 +0800
committerMilan Crha <mcrha@redhat.com>2011-06-14 14:54:20 +0800
commit38790d8478e906a5c59d0c4a5216f297f305bfeb (patch)
tree0f9a96db2765901f2a27b68c84815a491214ecc1 /calendar/gui/tag-calendar.c
parent08af0d1f81a4e983bb49d8fb8fe74e670adbb8f6 (diff)
downloadgsoc2013-evolution-38790d8478e906a5c59d0c4a5216f297f305bfeb.tar
gsoc2013-evolution-38790d8478e906a5c59d0c4a5216f297f305bfeb.tar.gz
gsoc2013-evolution-38790d8478e906a5c59d0c4a5216f297f305bfeb.tar.bz2
gsoc2013-evolution-38790d8478e906a5c59d0c4a5216f297f305bfeb.tar.lz
gsoc2013-evolution-38790d8478e906a5c59d0c4a5216f297f305bfeb.tar.xz
gsoc2013-evolution-38790d8478e906a5c59d0c4a5216f297f305bfeb.tar.zst
gsoc2013-evolution-38790d8478e906a5c59d0c4a5216f297f305bfeb.zip
Do not use deprecated EBook/ECal API
Diffstat (limited to 'calendar/gui/tag-calendar.c')
-rw-r--r--calendar/gui/tag-calendar.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/calendar/gui/tag-calendar.c b/calendar/gui/tag-calendar.c
index 0af271e1de..dff1285587 100644
--- a/calendar/gui/tag-calendar.c
+++ b/calendar/gui/tag-calendar.c
@@ -151,18 +151,18 @@ get_recur_events_italic (void)
**/
void
tag_calendar_by_client (ECalendar *ecal,
- ECal *client)
+ ECalClient *client)
{
struct calendar_tag_closure c;
g_return_if_fail (E_IS_CALENDAR (ecal));
- g_return_if_fail (E_IS_CAL (client));
+ g_return_if_fail (E_IS_CAL_CLIENT (client));
/* If the ECalendar isn't visible, we just return. */
if (!gtk_widget_get_visible (GTK_WIDGET (ecal)))
return;
- if (e_cal_get_load_state (client) != E_CAL_LOAD_LOADED)
+ if (!e_client_is_opened (E_CLIENT (client)))
return;
if (!prepare_tag (ecal, &c, NULL, TRUE))
@@ -171,7 +171,7 @@ tag_calendar_by_client (ECalendar *ecal,
c.skip_transparent_events = TRUE;
c.recur_events_italic = get_recur_events_italic ();
- e_cal_generate_instances (
+ e_cal_client_generate_instances (
client, c.start_time, c.end_time, tag_calendar_cb, &c);
}
@@ -182,19 +182,25 @@ static icaltimezone*
resolve_tzid_cb (const gchar *tzid,
gpointer data)
{
- ECal *client;
+ ECalClient *client;
icaltimezone *zone = NULL;
- g_return_val_if_fail (E_IS_CAL (data), NULL);
+ g_return_val_if_fail (E_IS_CAL_CLIENT (data), NULL);
- client = E_CAL (data);
+ client = E_CAL_CLIENT (data);
/* Try to find the builtin timezone first. */
zone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
- if (!zone) {
+ if (!zone && tzid) {
/* FIXME: Handle errors. */
- e_cal_get_timezone (client, tzid, &zone, NULL);
+ GError *error = NULL;
+
+ if (!e_cal_client_get_timezone_sync (client, tzid, &zone, NULL, &error)) {
+ g_debug ("%s: Failed to get timezone '%s': %s", G_STRFUNC, tzid, error->message);
+ if (error)
+ g_error_free (error);
+ }
}
return zone;
@@ -217,7 +223,7 @@ resolve_tzid_cb (const gchar *tzid,
void
tag_calendar_by_comp (ECalendar *ecal,
ECalComponent *comp,
- ECal *client,
+ ECalClient *client,
icaltimezone *display_zone,
gboolean clear_first,
gboolean comp_is_on_server,
@@ -239,7 +245,7 @@ tag_calendar_by_comp (ECalendar *ecal,
c.recur_events_italic = can_recur_events_italic && get_recur_events_italic ();
if (comp_is_on_server)
- e_cal_generate_instances_for_object (
+ e_cal_client_generate_instances_for_object (
client, e_cal_component_get_icalcomponent (comp),
c.start_time, c.end_time, tag_calendar_cb, &c);
else