diff options
-rw-r--r-- | calendar/ChangeLog | 6 | ||||
-rw-r--r-- | calendar/gui/dialogs/alarm-page.c | 89 |
2 files changed, 54 insertions, 41 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 0cf0fc48f7..c40f527b6b 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,5 +1,11 @@ 2001-08-16 Federico Mena Quintero <federico@ximian.com> + * gui/dialogs/alarm-page.c (clear_widgets): Set the default-to-add + notification to be display a message 15 minutes before the start + of the appointment. Fixes bug #7175. + +2001-08-16 Federico Mena Quintero <federico@ximian.com> + * gui/dialogs/comp-editor-util.c (comp_editor_strip_categories): New function to strip surrounding whitespace from a string of categories entered by the user. diff --git a/calendar/gui/dialogs/alarm-page.c b/calendar/gui/dialogs/alarm-page.c index fce8093149..1d3012fc9b 100644 --- a/calendar/gui/dialogs/alarm-page.c +++ b/calendar/gui/dialogs/alarm-page.c @@ -70,6 +70,47 @@ struct _AlarmPagePrivate { gboolean updating; }; +/* "relative" types */ +enum { + BEFORE, + AFTER +}; + +/* Time units */ +enum { + MINUTES, + HOURS, + DAYS +}; + +/* Option menu maps */ +static const int action_map[] = { + CAL_ALARM_DISPLAY, + CAL_ALARM_AUDIO, + CAL_ALARM_EMAIL, + CAL_ALARM_PROCEDURE, + -1 +}; + +static const int value_map[] = { + MINUTES, + HOURS, + DAYS, + -1 +}; + +static const int relative_map[] = { + BEFORE, + AFTER, + -1 +}; + +static const int time_map[] = { + CAL_ALARM_TRIGGER_RELATIVE_START, + CAL_ALARM_TRIGGER_RELATIVE_END, + -1 +}; + static void alarm_page_class_init (AlarmPageClass *class); @@ -270,6 +311,13 @@ clear_widgets (AlarmPage *apage) /* Start date */ gtk_label_set_text (GTK_LABEL (priv->date_time), ""); + /* Sane defaults */ + e_dialog_option_menu_set (priv->action, CAL_ALARM_DISPLAY, action_map); + e_dialog_spin_set (priv->interval_value, 15); + e_dialog_option_menu_set (priv->value_units, MINUTES, value_map); + e_dialog_option_menu_set (priv->relative, BEFORE, relative_map); + e_dialog_option_menu_set (priv->time, CAL_ALARM_TRIGGER_RELATIVE_START, time_map); + /* List data */ free_alarms (apage); } @@ -539,47 +587,6 @@ alarm_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates) -/* "relative" types */ -enum { - BEFORE, - AFTER -}; - -/* Time units */ -enum { - MINUTES, - HOURS, - DAYS -}; - -/* Option menu maps */ -static const int action_map[] = { - CAL_ALARM_DISPLAY, - CAL_ALARM_AUDIO, - CAL_ALARM_EMAIL, - CAL_ALARM_PROCEDURE, - -1 -}; - -static const int value_map[] = { - MINUTES, - HOURS, - DAYS, - -1 -}; - -static const int relative_map[] = { - BEFORE, - AFTER, - -1 -}; - -static const int time_map[] = { - CAL_ALARM_TRIGGER_RELATIVE_START, - CAL_ALARM_TRIGGER_RELATIVE_END, - -1 -}; - /* Gets the widgets from the XML file and returns if they are all available. */ static gboolean get_widgets (AlarmPage *apage) |