diff options
author | Federico Mena Quintero <federico@helixcode.com> | 2000-11-01 01:15:09 +0800 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2000-11-01 01:15:09 +0800 |
commit | 23596af78d9ca2d9db34e821674c7061fae678e6 (patch) | |
tree | 505da8e976346173d72f9914f86a7dc319fac738 /calendar/gui | |
parent | fee9d1b411184ef7fee35d1b72871a29e340b0c2 (diff) | |
download | gsoc2013-evolution-23596af78d9ca2d9db34e821674c7061fae678e6.tar.gz gsoc2013-evolution-23596af78d9ca2d9db34e821674c7061fae678e6.tar.zst gsoc2013-evolution-23596af78d9ca2d9db34e821674c7061fae678e6.zip |
New function. We split it from the radio callback so that we can call it
2000-10-30 Federico Mena Quintero <federico@helixcode.com>
* gui/event-editor.c (sensitize_recur_widgets): New function. We
split it from the radio callback so that we can call it explicitly
from fill_recurrence_widgets().
(fill_recurrence_widgets): Call sensitize_recur_widgets() as
appropriate.
svn path=/trunk/; revision=6293
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/event-editor.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/calendar/gui/event-editor.c b/calendar/gui/event-editor.c index f68bac0480..0ff3a10185 100644 --- a/calendar/gui/event-editor.c +++ b/calendar/gui/event-editor.c @@ -546,21 +546,19 @@ static const int recur_type_map[] = { RECUR_CUSTOM, -1 }; - -/* Callback used when one of the recurrence type radio buttons is toggled. We - * enable or the recurrence parameters. + +/* Sensitizes the recurrence widgets based on the state of the recurrence type + * radio group. */ static void -recurrence_type_toggled_cb (GtkWidget *widget, gpointer data) +sensitize_recur_widgets (EventEditor *ee) { - EventEditor *ee; EventEditorPrivate *priv; enum recur_type type; - ee = EVENT_EDITOR (data); priv = ee->priv; - type = e_dialog_radio_get (widget, recur_type_map); + type = e_dialog_radio_get (priv->recurrence_none, recur_type_map); switch (type) { case RECUR_NONE: @@ -582,6 +580,18 @@ recurrence_type_toggled_cb (GtkWidget *widget, gpointer data) g_assert_not_reached (); } } + +/* Callback used when one of the recurrence type radio buttons is toggled. We + * enable or the recurrence parameters. + */ +static void +recurrence_type_toggled_cb (GtkWidget *widget, gpointer data) +{ + EventEditor *ee; + + ee = EVENT_EDITOR (data); + sensitize_recur_widgets (ee); +} /* Callback used when the recurrence interval option menu changes. We need to * change the contents of the recurrence special widget. @@ -1054,6 +1064,7 @@ fill_recurrence_widgets (EventEditor *ee) && !cal_component_has_rrules (priv->comp) && !cal_component_has_exrules (priv->comp)) { e_dialog_radio_set (priv->recurrence_none, RECUR_NONE, recur_type_map); + sensitize_recur_widgets (ee); return; } @@ -1190,6 +1201,7 @@ fill_recurrence_widgets (EventEditor *ee) /* If we got here it means it is a simple recurrence */ e_dialog_radio_set (priv->recurrence_simple, RECUR_SIMPLE, recur_type_map); + sensitize_recur_widgets (ee); e_dialog_spin_set (priv->recurrence_interval_value, r->interval); fill_ending_date (ee, r); @@ -1199,6 +1211,7 @@ fill_recurrence_widgets (EventEditor *ee) custom: e_dialog_radio_set (priv->recurrence_custom, RECUR_CUSTOM, recur_type_map); + sensitize_recur_widgets (ee); out: |