diff options
author | Milan Crha <mcrha@redhat.com> | 2010-07-09 20:29:51 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2010-07-09 20:29:51 +0800 |
commit | 03d626856b294bc98919ac244e04e9b8821a681d (patch) | |
tree | 62433e158f1791aa6b9222ecbe05d164c4703f6c /calendar/gui/alarm-notify | |
parent | 6d4ce8571ff62a3e489999d2feeac1691e06c59a (diff) | |
download | gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.gz gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.bz2 gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.lz gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.xz gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.zst gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.zip |
Bug #623204 - Be able to report detailed errors from backends
Diffstat (limited to 'calendar/gui/alarm-notify')
-rw-r--r-- | calendar/gui/alarm-notify/alarm-notify.c | 8 | ||||
-rw-r--r-- | calendar/gui/alarm-notify/alarm-queue.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c index 7ad414c61c..df6a8fc4f7 100644 --- a/calendar/gui/alarm-notify/alarm-notify.c +++ b/calendar/gui/alarm-notify/alarm-notify.c @@ -308,16 +308,16 @@ alarm_notify_new (void) } static void -cal_opened_cb (ECal *client, ECalendarStatus status, gpointer user_data) +cal_opened_cb (ECal *client, const GError *error, gpointer user_data) { AlarmNotifyPrivate *priv; AlarmNotify *an = ALARM_NOTIFY (user_data); priv = an->priv; - d (printf("%s:%d (cal_opened_cb) %s - Calendar Status %d\n", __FILE__, __LINE__, e_cal_get_uri (client), status)); + d (printf("%s:%d (cal_opened_cb) %s - Calendar Status %d%s%s%s\n", __FILE__, __LINE__, e_cal_get_uri (client), error ? error->code : 0, error ? " (" : "", error ? error->message : "", error ? ")" : "")); - if (status == E_CALENDAR_STATUS_OK) + if (!error) alarm_queue_add_client (client); else { g_hash_table_remove (priv->uri_client_hash[e_cal_get_source_type (client)], @@ -389,7 +389,7 @@ alarm_notify_add_calendar (AlarmNotify *an, ECalSourceType source_type, ESource if (client) { d (printf("%s:%d (alarm_notify_add_calendar) %s - Calendar Open Async... %p\n", __FILE__, __LINE__, str_uri, client)); g_hash_table_insert (priv->uri_client_hash[source_type], g_strdup (str_uri), client); - g_signal_connect (G_OBJECT (client), "cal_opened", G_CALLBACK (cal_opened_cb), an); + g_signal_connect (G_OBJECT (client), "cal_opened_ex", G_CALLBACK (cal_opened_cb), an); /* to resolve floating DATE-TIME properly */ e_cal_set_default_timezone (client, config_data_get_timezone (), NULL); e_cal_open_async (client, FALSE); diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index f7ef6fdcf4..426d69ec55 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -597,14 +597,14 @@ load_alarms_for_today (ClientAlarms *ca) /* Called when a calendar client finished loading; we load its alarms */ static void -cal_opened_cb (ECal *client, ECalendarStatus status, gpointer data) +cal_opened_cb (ECal *client, const GError *error, gpointer data) { ClientAlarms *ca; ca = data; - d(printf("%s:%d (cal_opened_cb) - Opened Calendar %p (Status %d)\n",__FILE__, __LINE__, client, status==E_CALENDAR_STATUS_OK)); - if (status != E_CALENDAR_STATUS_OK) + d(printf("%s:%d (cal_opened_cb) - Opened Calendar %p (Status %d%s%s%s)\n",__FILE__, __LINE__, client, error ? error->code : 0, error ? " (" : "", error ? error->message : "", error ? ")" : "")); + if (error) return; load_alarms_for_today (ca); @@ -1999,7 +1999,7 @@ alarm_queue_add_async (struct _alarm_client_msg *msg) if (e_cal_get_load_state (client) == E_CAL_LOAD_LOADED) { load_alarms_for_today (ca); } else { - g_signal_connect (client, "cal_opened", + g_signal_connect (client, "cal_opened_ex", G_CALLBACK (cal_opened_cb), ca); } |