[evolution/evolution-3-12] [Alarm-notify] Do not show "Not supported" error on an alarm dismiss
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/evolution-3-12] [Alarm-notify] Do not show "Not supported" error on an alarm dismiss
- Date: Wed, 26 Nov 2014 11:10:09 +0000 (UTC)
commit ed1a4185d0ed2b13e25a37412a9337a1addefb85
Author: Milan Crha <mcrha redhat com>
Date: Wed Nov 26 12:05:15 2014 +0100
[Alarm-notify] Do not show "Not supported" error on an alarm dismiss
calendar/alarm-notify/alarm-queue.c | 16 +++-------------
1 files changed, 3 insertions(+), 13 deletions(-)
---
diff --git a/calendar/alarm-notify/alarm-queue.c b/calendar/alarm-notify/alarm-queue.c
index f52a9ef..7087f8a 100644
--- a/calendar/alarm-notify/alarm-queue.c
+++ b/calendar/alarm-notify/alarm-queue.c
@@ -342,7 +342,8 @@ alarm_queue_discard_alarm_cb (GObject *source,
g_return_if_fail (client != NULL);
- if (!e_cal_client_discard_alarm_finish (client, result, &error))
+ if (!e_cal_client_discard_alarm_finish (client, result, &error) &&
+ !g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_NOT_SUPPORTED))
g_warning ("Failed to discard alarm at '%s': %s",
e_source_get_display_name (e_client_get_source (E_CLIENT (client))),
error ? error->message : "Unknown error");
@@ -375,8 +376,7 @@ remove_queued_alarm (CompQueuedAlarms *cqa,
cqa->queued_alarms = g_slist_delete_link (cqa->queued_alarms, l);
- if (remove_alarm) {
- GError *error = NULL;
+ if (remove_alarm && !e_client_is_readonly (E_CLIENT (cqa->parent_client->cal_client))) {
ECalComponentId *id;
id = e_cal_component_get_id (cqa->alarms->comp);
@@ -388,16 +388,6 @@ remove_queued_alarm (CompQueuedAlarms *cqa,
alarm_queue_discard_alarm_cb, NULL);
cqa->expecting_update = FALSE;
- if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_NOT_SUPPORTED)) {
- g_error_free (error);
-
- } else if (error != NULL) {
- g_warning (
- "%s: Failed to discard alarm: %s",
- G_STRFUNC, error->message);
- g_error_free (error);
- }
-
e_cal_component_free_id (id);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]