aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@novell.com>2004-06-18 21:30:36 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2004-06-18 21:30:36 +0800
commite876ec981d4042b89a5dc77ccc67e851efe5db30 (patch)
treec9a3162d33c446daeab26e3e6bf0a7e50a360c76 /calendar/gui
parent5f0f572bd1e95018fef959ecb63260afa8e6767b (diff)
downloadgsoc2013-evolution-e876ec981d4042b89a5dc77ccc67e851efe5db30.tar.gz
gsoc2013-evolution-e876ec981d4042b89a5dc77ccc67e851efe5db30.tar.zst
gsoc2013-evolution-e876ec981d4042b89a5dc77ccc67e851efe5db30.zip
Fixes #60293
2004-06-18 Rodrigo Moya <rodrigo@novell.com> Fixes #60293 * gui/dialogs/recurrence-page.c (type_toggled_cb): make sure we enable/disable correctly the 'Add' button. svn path=/trunk/; revision=26417
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. */