aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-10-31 06:28:46 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-10-31 06:28:46 +0800
commitfff58fd097a00d653649469b96b4d0f5d041677c (patch)
tree96c6c169ca8a796600c813fa16a68d7aa468cb24 /calendar/gui
parentc73922fb482a0ea02178e948604213918766e2fb (diff)
downloadgsoc2013-evolution-fff58fd097a00d653649469b96b4d0f5d041677c.tar
gsoc2013-evolution-fff58fd097a00d653649469b96b4d0f5d041677c.tar.gz
gsoc2013-evolution-fff58fd097a00d653649469b96b4d0f5d041677c.tar.bz2
gsoc2013-evolution-fff58fd097a00d653649469b96b4d0f5d041677c.tar.lz
gsoc2013-evolution-fff58fd097a00d653649469b96b4d0f5d041677c.tar.xz
gsoc2013-evolution-fff58fd097a00d653649469b96b4d0f5d041677c.tar.zst
gsoc2013-evolution-fff58fd097a00d653649469b96b4d0f5d041677c.zip
if we are doing all day stuff, make the drag increment 1 day at a time
2001-10-30 JP Rosevear <jpr@ximian.com> * 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
Diffstat (limited to 'calendar/gui')
-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. */