aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-component.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2004-04-15 05:41:21 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-04-15 05:41:21 +0800
commit726d0388cf3d1164e7d31709e15a93ab00654988 (patch)
treebfbd38e2154b94226eeb8a97d238deed868da28d /calendar/gui/calendar-component.c
parent24c56f175744c852ef211207405ea40ae3fba450 (diff)
downloadgsoc2013-evolution-726d0388cf3d1164e7d31709e15a93ab00654988.tar
gsoc2013-evolution-726d0388cf3d1164e7d31709e15a93ab00654988.tar.gz
gsoc2013-evolution-726d0388cf3d1164e7d31709e15a93ab00654988.tar.bz2
gsoc2013-evolution-726d0388cf3d1164e7d31709e15a93ab00654988.tar.lz
gsoc2013-evolution-726d0388cf3d1164e7d31709e15a93ab00654988.tar.xz
gsoc2013-evolution-726d0388cf3d1164e7d31709e15a93ab00654988.tar.zst
gsoc2013-evolution-726d0388cf3d1164e7d31709e15a93ab00654988.zip
Fixes #56613
2004-04-14 JP Rosevear <jpr@ximian.com> Fixes #56613 * gui/gnome-cal.h: add proto * gui/gnome-cal.c (client_cal_opened_cb): key the clients by uid (backend_died_cb): ditto (gnome_calendar_add_source): ditto (gnome_calendar_remove_source): use remove_source_by_uid (gnome_calendar_remove_source_by_uid): new function to remove a source by uid (gnome_calendar_set_default_source): key the clients by uid * gui/calendar-component.c (update_task_selection): the source could be NULL if the source was deleted rather than unchecked (update_primary_task_selection): look at the task source list svn path=/trunk/; revision=25469
Diffstat (limited to 'calendar/gui/calendar-component.c')
-rw-r--r--calendar/gui/calendar-component.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index 3ea1d99f46..828c751fe4 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -238,7 +238,9 @@ update_task_selection (CalendarComponent *calendar_component)
ESource *source;
source = e_source_list_peek_source_by_uid (priv->task_source_list, uid);
- if (!is_in_uids (uids_selected, source))
+ if (!source)
+ gnome_calendar_remove_source_by_uid (priv->calendar, E_CAL_SOURCE_TYPE_TODO, uid);
+ else if (!is_in_uids (uids_selected, source))
gnome_calendar_remove_source (priv->calendar, E_CAL_SOURCE_TYPE_TODO, source);
g_free (uid);
@@ -294,7 +296,7 @@ update_primary_task_selection (CalendarComponent *calendar_component)
uid = calendar_config_get_primary_tasks ();
if (uid) {
- source = e_source_list_peek_source_by_uid (priv->source_list, uid);
+ source = e_source_list_peek_source_by_uid (priv->task_source_list, uid);
g_free (uid);
}