aboutsummaryrefslogtreecommitdiffstats
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
parentc73922fb482a0ea02178e948604213918766e2fb (diff)
downloadgsoc2013-evolution-fff58fd097a00d653649469b96b4d0f5d041677c.tar.gz
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
-rw-r--r--calendar/ChangeLog8
-rw-r--r--calendar/gui/e-meeting-time-sel.c20
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 <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
+
2001-10-30 Federico Mena Quintero <federico@ximian.com>
* 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 <jpr@ximian.com>
-
+
* 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. */