From 7223655df2828370ab19f14953ecd22a30a4b55f Mon Sep 17 00:00:00 2001 From: Suman Manjunath Date: Mon, 8 Dec 2008 04:02:47 +0000 Subject: Patch from Paul Bolle : Fix for bug #551599 (Do not fallback to default 15 minutes alarm offset if alarm is triggered at start (or end) of appointment). svn path=/trunk/; revision=36837 --- calendar/ChangeLog | 8 ++++++++ calendar/gui/dialogs/alarm-dialog.c | 17 ++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 58c6860eaf..4ec1932a79 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,11 @@ +2008-12-08 Paul Bolle + + ** Fix for bug #551599 + + * gui/dialogs/alarm-dialog.c: (populate_widgets_from_alarm): + Do not fallback to default 15 minutes alarm offset if alarm is + triggered at start (or end) of appointment. + 2008-12-05 Milan Crha ** Part of fix for bug #332629 diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c index a5f13ccb51..7e429a28b2 100644 --- a/calendar/gui/dialogs/alarm-dialog.c +++ b/calendar/gui/dialogs/alarm-dialog.c @@ -623,19 +623,18 @@ populate_widgets_from_alarm (Dialog *dialog) break; } - if ( trigger->u.rel_duration.hours ) { + if ( trigger->u.rel_duration.days ) { + e_dialog_option_menu_set (dialog->value_units, DAYS, value_map); + e_dialog_spin_set (dialog->interval_value, trigger->u.rel_duration.days); + } else if ( trigger->u.rel_duration.hours ) { e_dialog_option_menu_set (dialog->value_units, HOURS, value_map); e_dialog_spin_set (dialog->interval_value, trigger->u.rel_duration.hours); - } - - if ( trigger->u.rel_duration.minutes ){ + } else if ( trigger->u.rel_duration.minutes ) { e_dialog_option_menu_set (dialog->value_units, MINUTES, value_map); e_dialog_spin_set (dialog->interval_value, trigger->u.rel_duration.minutes); - } - - if ( trigger->u.rel_duration.days ){ - e_dialog_option_menu_set (dialog->value_units, DAYS, value_map); - e_dialog_spin_set (dialog->interval_value, trigger->u.rel_duration.days); + } else { + e_dialog_option_menu_set (dialog->value_units, MINUTES, value_map); + e_dialog_spin_set (dialog->interval_value, 0); } /* Repeat options */ -- cgit