aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-meeting-time-sel.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/e-meeting-time-sel.c')
-rw-r--r--calendar/gui/e-meeting-time-sel.c20
1 files changed, 14 insertions, 6 deletions
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. */