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/ChangeLog | 8 +++++++- calendar/gui/e-meeting-time-sel.c | 20 ++++++++++++++------ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 3ce8d00460..982faedcb4 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +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 + 2001-10-30 Federico Mena Quintero * gui/dialogs/meeting-page.c (meeting_page_fill_component): Add @@ -16,7 +22,7 @@ Thanks a *LOT* to Michael Zucchi for running this through Purify. 2001-10-30 JP Rosevear - + * gui/e-meeting-time-sel-item.c (e_meeting_time_selector_item_button_press): move in whole day increments if we are in all day mode 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 v1.2.3