From fff58fd097a00d653649469b96b4d0f5d041677c Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Tue, 30 Oct 2001 22:28:46 +0000 Subject: if we are doing all day stuff, make the drag increment 1 day at a time 2001-10-30 JP Rosevear * gui/e-meeting-time-sel.c (e_meeting_time_selector_drag_meeting_time): if we are doing all day stuff, make the drag increment 1 day at a time svn path=/trunk/; revision=14492 --- calendar/gui/e-meeting-time-sel.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c index 189072508d..6fc739967b 100644 --- a/calendar/gui/e-meeting-time-sel.c +++ b/calendar/gui/e-meeting-time-sel.c @@ -2274,14 +2274,22 @@ e_meeting_time_selector_drag_meeting_time (EMeetingTimeSelector *mts, /* Calculate the nearest half-hour or hour, depending on whether zoomed_out is set. */ - if (mts->zoomed_out) { - if (drag_time.minute > 30) - drag_time.hour++; - drag_time.minute = 0; + if (e_date_edit_get_show_time (E_DATE_EDIT (mts->end_date_edit))) { + if (mts->zoomed_out) { + if (drag_time.minute > 30) + drag_time.hour++; + drag_time.minute = 0; + } else { + drag_time.minute += 15; + drag_time.minute -= drag_time.minute % 30; + } } else { - drag_time.minute += 15; - drag_time.minute -= drag_time.minute % 30; + if (drag_time.hour > 12) + g_date_add_days (&drag_time.date, 1); + drag_time.hour = 0; + drag_time.minute = 0; } + e_meeting_time_selector_fix_time_overflows (&drag_time); /* Now make sure we are between first_time & last_time. */ -- cgit