From ec86e3f4d5d20bd6ce273030f7f6201fa6cc9851 Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Wed, 25 Jan 2006 10:48:16 +0000 Subject: fixes #325762 svn path=/trunk/; revision=31308 --- calendar/gui/alarm-notify/alarm-notify.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'calendar/gui/alarm-notify/alarm-notify.c') diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c index edef6d34bb..d268c6ffda 100644 --- a/calendar/gui/alarm-notify/alarm-notify.c +++ b/calendar/gui/alarm-notify/alarm-notify.c @@ -92,10 +92,13 @@ process_removal_in_hash (gpointer key, gpointer value, gpointer data) for (q = sources; q != NULL; q = q->next) { ESource *source = E_SOURCE (q->data); char *source_uri; - + const char *completion = e_source_get_property (source, "alarm"); + source_uri = e_source_get_uri (source); if (strcmp (source_uri, uri) == 0) - found = TRUE; + if (!completion || !g_ascii_strcasecmp (completion, "true")) + found = TRUE; + g_free (source_uri); if (found) @@ -118,6 +121,7 @@ list_changed_cb (ESourceList *source_list, gpointer data) GList *l; int i; + printf("LIST CHANGED\n"); priv = an->priv; /* Figure out the source type */ @@ -139,9 +143,9 @@ list_changed_cb (ESourceList *source_list, gpointer data) for (q = sources; q != NULL; q = q->next) { ESource *source = E_SOURCE (q->data); char *uri; - const char *uid = e_source_peek_uid (source); - - if (!e_source_list_peek_source_by_uid (priv->selected_calendars, uid)) + const char *completion = e_source_get_property (source, "alarm"); + + if (completion && !g_ascii_strcasecmp (completion, "false")) continue; uri = e_source_get_uri (source); @@ -195,9 +199,9 @@ load_calendars (AlarmNotify *an, ECalSourceType source_type) for (q = sources; q != NULL; q = q->next) { ESource *source = E_SOURCE (q->data); char *uri; - const char *uid = e_source_peek_uid (source); - - if (!e_source_list_peek_source_by_uid (priv->selected_calendars, uid)) + const char *completion = e_source_get_property (source, "alarm"); + + if (completion && !g_ascii_strcasecmp (completion, "false")) continue; uri = e_source_get_uri (source); @@ -236,7 +240,7 @@ alarm_notify_init (AlarmNotify *an, AlarmNotifyClass *klass) priv = g_new0 (AlarmNotifyPrivate, 1); an->priv = priv; priv->mutex = g_mutex_new (); - priv->selected_calendars = config_data_get_calendars ("/apps/evolution/calendar/notify/calendars"); + priv->selected_calendars = config_data_get_calendars ("/apps/evolution/calendar/sources"); for (i = 0; i < E_CAL_SOURCE_TYPE_LAST; i++) -- cgit v1.2.3