diff options
author | Chenthill Palanisamy <pchen@src.gnome.org> | 2006-11-07 20:24:27 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2006-11-07 20:24:27 +0800 |
commit | 2f3f9457ae0630e788fdd99214709dda64ee3d1a (patch) | |
tree | e70816276fea011db35d9c3dcfe1579f0a30240d /calendar/gui | |
parent | 3053e7ad00c3ddf9cae531ef89143de36d14c226 (diff) | |
download | gsoc2013-evolution-2f3f9457ae0630e788fdd99214709dda64ee3d1a.tar gsoc2013-evolution-2f3f9457ae0630e788fdd99214709dda64ee3d1a.tar.gz gsoc2013-evolution-2f3f9457ae0630e788fdd99214709dda64ee3d1a.tar.bz2 gsoc2013-evolution-2f3f9457ae0630e788fdd99214709dda64ee3d1a.tar.lz gsoc2013-evolution-2f3f9457ae0630e788fdd99214709dda64ee3d1a.tar.xz gsoc2013-evolution-2f3f9457ae0630e788fdd99214709dda64ee3d1a.tar.zst gsoc2013-evolution-2f3f9457ae0630e788fdd99214709dda64ee3d1a.zip |
Fixes #208318.
svn path=/trunk/; revision=32956
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/alarm-notify/alarm-notify.c | 10 | ||||
-rw-r--r-- | calendar/gui/dialogs/cal-prefs-dialog.c | 14 |
2 files changed, 19 insertions, 5 deletions
diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c index 7e69114003..3f723e1719 100644 --- a/calendar/gui/alarm-notify/alarm-notify.c +++ b/calendar/gui/alarm-notify/alarm-notify.c @@ -152,7 +152,8 @@ list_changed_cb (ESourceList *source_list, gpointer data) char *uri; const char *completion = e_source_get_property (source, "alarm"); - if (completion && !g_ascii_strcasecmp (completion, "false")) + if (completion && (!g_ascii_strcasecmp (completion, "false") || + !g_ascii_strcasecmp (completion, "never"))) continue; uri = e_source_get_uri (source); @@ -211,7 +212,8 @@ load_calendars (AlarmNotify *an, ECalSourceType source_type) char *uri; const char *completion = e_source_get_property (source, "alarm"); - if (completion && !g_ascii_strcasecmp (completion, "false")) + if (completion && (!g_ascii_strcasecmp (completion, "false") || + !g_ascii_strcasecmp (completion, "never"))) continue; uri = e_source_get_uri (source); @@ -388,7 +390,7 @@ cal_opened_cb (ECal *client, ECalendarStatus status, gpointer user_data) priv = an->priv; - d (printf("%s:%d (cal_opened_cb) - Calendar Status %d\n", __FILE__, __LINE__, status==E_CALENDAR_STATUS_OK)); + d (printf("%s:%d (cal_opened_cb) %s - Calendar Status %d\n", __FILE__, __LINE__, e_cal_get_uri (client), status)); if (status == E_CALENDAR_STATUS_OK) alarm_queue_add_client (client); @@ -451,7 +453,7 @@ alarm_notify_add_calendar (AlarmNotify *an, ECalSourceType source_type, ESource client = auth_new_cal_from_source (source, source_type); if (client) { - d (printf("%s:%d (alarm_notify_add_calendar) - Calendar Open Async... %p\n", __FILE__, __LINE__, 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); e_cal_open_async (client, FALSE); diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c index bd22a5f21e..9763ce3e57 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.c +++ b/calendar/gui/dialogs/cal-prefs-dialog.c @@ -325,6 +325,8 @@ alarms_selection_changed (ESourceSelector *selector, CalendarPrefsDialog *prefs) GSList *selection; GSList *l; GSList *groups; + ESource *source; + gchar *alarm; /* first we clear all the alarm flags from all sources */ g_message ("Clearing selection"); @@ -332,8 +334,12 @@ alarms_selection_changed (ESourceSelector *selector, CalendarPrefsDialog *prefs) ESourceGroup *group = E_SOURCE_GROUP (groups->data); GSList *sources; for (sources = e_source_group_peek_sources (group); sources; sources = sources->next) { - ESource *source = E_SOURCE (sources->data); + source = E_SOURCE (sources->data); + alarm = e_source_get_property (source, "alarm"); + if (alarm && !g_ascii_strcasecmp (alarm, "never")) + continue; + g_message ("Unsetting for %s", e_source_peek_name (source)); e_source_set_property (source, "alarm", "false"); } @@ -343,6 +349,12 @@ alarms_selection_changed (ESourceSelector *selector, CalendarPrefsDialog *prefs) property on those sources */ selection = e_source_selector_get_selection (selector); for (l = selection; l; l = l->next) { + source = E_SOURCE (l->data); + + alarm = e_source_get_property (source, "alarm"); + if (alarm && !g_ascii_strcasecmp (alarm, "never")) + continue; + g_message ("Setting for %s", e_source_peek_name (E_SOURCE (l->data))); e_source_set_property (E_SOURCE (l->data), "alarm", "true"); } |