aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/alarm-notify/alarm-notify.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/alarm-notify/alarm-notify.c')
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c
index 9e7f1335a8..37addc4d9a 100644
--- a/calendar/gui/alarm-notify/alarm-notify.c
+++ b/calendar/gui/alarm-notify/alarm-notify.c
@@ -179,6 +179,7 @@ alarm_notify_add_calendar (AlarmNotify *an, const char *str_uri, gboolean load_a
if (e_cal_open (client, FALSE, NULL)) {
g_hash_table_insert (priv->uri_client_hash,
g_strdup (str_uri), client);
+ alarm_queue_add_client (client);
}
}
}
@@ -188,13 +189,15 @@ alarm_notify_remove_calendar (AlarmNotify *an, const char *str_uri)
{
AlarmNotifyPrivate *priv;
ECal *client;
+ gpointer orig_key, orig_value;
priv = an->priv;
- client = g_hash_table_lookup (priv->uri_client_hash, str_uri);
- if (client) {
+ if (g_hash_table_lookup_extended (priv->uri_client_hash, str_uri, &orig_key, &orig_value)) {
alarm_queue_remove_client (client);
g_hash_table_remove (priv->uri_client_hash, str_uri);
+ g_free (orig_key);
+ g_object_unref (orig_value);
}
}