From 41b8acd59d410521c8e98ccebcce2a72d3e6e1d9 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Mon, 24 Jan 2005 12:58:44 +0000 Subject: if there are detached instances, disable recurrence date widgets. 2005-01-24 Rodrigo Moya * gui/dialogs/recurrence-page.c (sensitize_buttons): if there are detached instances, disable recurrence date widgets. svn path=/trunk/; revision=28525 --- calendar/gui/dialogs/recurrence-page.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'calendar/gui') diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c index 9d61469aac..44b0e2c555 100644 --- a/calendar/gui/dialogs/recurrence-page.c +++ b/calendar/gui/dialogs/recurrence-page.c @@ -531,6 +531,19 @@ sensitize_buttons (RecurrencePage *rpage) read_only = TRUE; icalcomponent_free (icalcomp); } + + if (!read_only) { + GList *list; + + /* see if we have detached instances */ + if (e_cal_get_objects_for_uid (COMP_EDITOR_PAGE (rpage)->client, uid, &list, NULL)) { + if (list && g_list_length (list) > 1) + read_only = TRUE; + + g_list_foreach (list, (GFunc) icalcomponent_free, NULL); + g_list_free (list); + } + } } if (!read_only) -- cgit v1.2.3