From 7581a8ab9ba7ea0024df7fafa2ba72c36a27736b Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Sun, 5 Sep 2004 13:25:03 +0000 Subject: Check the static capability to enable or disable the assign tasks in the 2004-09-05 Chenthill Palanisamy * gui/e-calendar-table.c (e_calendar_table_show_popup_menu): Check the static capability to enable or disable the assign tasks in the popup menu. * gui/dialogs/recurrence-page.c (sensitize_buttons): Check for the static capability to convert a existing appointment to recurrence appointment for enabling or diabling the recurrence widgets. svn path=/trunk/; revision=27152 --- calendar/gui/dialogs/recurrence-page.c | 11 +++++++++++ calendar/gui/e-calendar-table.c | 3 +++ 2 files changed, 14 insertions(+) (limited to 'calendar/gui') diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c index e58fb28906..921f3d32bd 100644 --- a/calendar/gui/dialogs/recurrence-page.c +++ b/calendar/gui/dialogs/recurrence-page.c @@ -531,6 +531,8 @@ sensitize_buttons (RecurrencePage *rpage) gboolean read_only; gint selected_rows; RecurrencePagePrivate *priv; + icalcomponent *icalcomp; + char *uid; priv = rpage->priv; @@ -539,6 +541,15 @@ sensitize_buttons (RecurrencePage *rpage) if (!e_cal_is_read_only (COMP_EDITOR_PAGE (rpage)->client, &read_only, NULL)) read_only = TRUE; + + if (!read_only) { + e_cal_component_get_uid (priv->comp, &uid); + + if (e_cal_get_static_capability (COMP_EDITOR_PAGE (rpage)->client, CAL_STATIC_CAPABILITY_NO_CONV_TO_RECUR) && e_cal_get_object(COMP_EDITOR_PAGE (rpage)->client, uid, NULL, &icalcomp, NULL)) { + read_only = TRUE; + icalcomponent_free (icalcomp); + } + } if (!read_only) sensitize_recur_widgets (rpage); diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index 08e5f30393..7eec950039 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -1133,6 +1133,9 @@ e_calendar_table_show_popup_menu (ETable *table, if (e_cal_get_static_capability (comp_data->client, CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT)) disable_mask |= MASK_ASSIGNABLE; + if (e_cal_get_static_capability (comp_data->client, CAL_STATIC_CAPABILITY_NO_CONV_TO_ASSIGN_TASK)) + disable_mask |= MASK_ASSIGNABLE; + setup_popup_icons (tasks_popup_menu); gtk_menu = e_popup_menu_create (tasks_popup_menu, disable_mask, hide_mask, cal_table); -- cgit v1.2.3