diff options
author | Milan Crha <mcrha@redhat.com> | 2008-07-04 15:19:48 +0800 |
---|---|---|
committer | Milan Crha <mcrha@src.gnome.org> | 2008-07-04 15:19:48 +0800 |
commit | a9a98b2bd2535b94193a8a98da9fe67d211cf160 (patch) | |
tree | 713db68c3330749c1312281abd9b8f61a2ac19e0 /calendar | |
parent | 815a25a6a1fa8b2fd8aa5a475612600f1e1767ff (diff) | |
download | gsoc2013-evolution-a9a98b2bd2535b94193a8a98da9fe67d211cf160.tar.gz gsoc2013-evolution-a9a98b2bd2535b94193a8a98da9fe67d211cf160.tar.zst gsoc2013-evolution-a9a98b2bd2535b94193a8a98da9fe67d211cf160.zip |
** Fix for bug #368038
2008-07-04 Milan Crha <mcrha@redhat.com>
** Fix for bug #368038
* gui/calendar-component.c: (ensure_sources):
Ensure only one Birthdays & Anniversaries source.
svn path=/trunk/; revision=35721
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 7 | ||||
-rw-r--r-- | calendar/gui/calendar-component.c | 16 |
2 files changed, 22 insertions, 1 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 8890121ca9..82dc32ab48 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2008-07-04 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #368038 + + * gui/calendar-component.c: (ensure_sources): + Ensure only one Birthdays & Anniversaries source. + 2008-07-03 Milan Crha <mcrha@redhat.com> ** Fix for bug #540152 diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index 4916bccfeb..5941ff6962 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -278,8 +278,22 @@ ensure_sources (CalendarComponent *component) } if (contacts) { GSList *sources = e_source_group_peek_sources (contacts); - if (sources) + if (sources) { birthdays_source = E_SOURCE (sources->data); /* There is only one source under Contacts Group*/ + + if (sources->next) { + /* Ensure we have only one contacts source - we was able to create more than one before */ + GSList *l = NULL, *p; + + for (p = sources->next; p; p = p->next) + l = g_slist_prepend (l, p->data); + + for (p = l; p; p = p->next) + e_source_group_remove_source (contacts, p->data); + + g_slist_free (l); + } + } } else { /* Create the contacts group */ |