aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/dialogs/recurrence-page.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index f08107c8e2..50bdb108b9 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -2066,15 +2066,29 @@ static void
type_toggled_cb (GtkToggleButton *toggle, gpointer data)
{
RecurrencePage *rpage;
+ RecurrencePagePrivate *priv;
+ gboolean read_only;
rpage = RECURRENCE_PAGE (data);
+ priv = rpage->priv;
+
field_changed (rpage);
if (toggle->active) {
sensitize_buttons (rpage);
preview_recur (rpage);
}
+
+ /* enable/disable the 'Add' button */
+ if (!e_cal_is_read_only (COMP_EDITOR_PAGE (rpage)->client, &read_only, NULL))
+ read_only = TRUE;
+
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->none)) || read_only)
+ gtk_widget_set_sensitive (priv->exception_add, FALSE);
+ else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->simple)) ||
+ gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->custom)))
+ gtk_widget_set_sensitive (priv->exception_add, TRUE);
}
/* Callback used when the recurrence interval value spin button changes. */