aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2003-03-05 03:59:21 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-03-05 03:59:21 +0800
commitdf4595a2b8e0f837dfbe1b1123aa80990db9b992 (patch)
tree58c7448efe9ead085c86d0b622b515ccb7b3ac57
parentae7622009e35515cf78e2d5ccbbb0e14b94b3f30 (diff)
downloadgsoc2013-evolution-df4595a2b8e0f837dfbe1b1123aa80990db9b992.tar.gz
gsoc2013-evolution-df4595a2b8e0f837dfbe1b1123aa80990db9b992.tar.zst
gsoc2013-evolution-df4595a2b8e0f837dfbe1b1123aa80990db9b992.zip
Partially Fixes #23606 (from Jack Jia <jack.jia@sun.com>)
2003-03-04 JP Rosevear <jpr@ximian.com> Partially Fixes #23606 (from Jack Jia <jack.jia@sun.com>) * gui/dialogs/schedule-page.c (update_time): handle no end date if the start is date only * gui/dialogs/event-page.c (update_time): ditto svn path=/trunk/; revision=20146
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/gui/dialogs/event-page.c8
-rw-r--r--calendar/gui/dialogs/schedule-page.c7
3 files changed, 22 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index bd3be952b0..14d8dd5027 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,4 +1,13 @@
2003-03-04 JP Rosevear <jpr@ximian.com>
+
+ Partially Fixes #23606 (from Jack Jia <jack.jia@sun.com>)
+
+ * gui/dialogs/schedule-page.c (update_time): handle no end date if
+ the start is date only
+
+ * gui/dialogs/event-page.c (update_time): ditto
+
+2003-03-04 JP Rosevear <jpr@ximian.com>
Merging in 1.2 stuff
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index a7e1655c5a..384a39c419 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -286,7 +286,7 @@ static void
update_time (EventPage *epage, CalComponentDateTime *start_date, CalComponentDateTime *end_date)
{
EventPagePrivate *priv;
- struct icaltimetype *start_tt, *end_tt;
+ struct icaltimetype *start_tt, *end_tt, implied_tt;
icaltimezone *start_zone = NULL, *end_zone = NULL;
CalClientGetStatus status;
gboolean all_day_event;
@@ -323,6 +323,12 @@ update_time (EventPage *epage, CalComponentDateTime *start_date, CalComponentDat
all_day_event = FALSE;
start_tt = start_date->value;
end_tt = end_date->value;
+ if (!end_tt && start_tt->is_date) {
+ end_tt = &implied_tt;
+ *end_tt = *start_tt;
+ icaltime_adjust (end_tt, 1, 0, 0, 0);
+ }
+
if (start_tt->is_date && end_tt->is_date) {
all_day_event = TRUE;
if (icaltime_compare_date_only (*end_tt, *start_tt) > 0) {
diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c
index b062088bc8..97029704a2 100644
--- a/calendar/gui/dialogs/schedule-page.c
+++ b/calendar/gui/dialogs/schedule-page.c
@@ -236,7 +236,12 @@ update_time (SchedulePage *spage, CalComponentDateTime *start_date, CalComponent
}
start_tt = *start_date->value;
- end_tt = *end_date->value;
+ if (!end_date->value && start_tt.is_date) {
+ end_tt = start_tt;
+ icaltime_adjust (&end_tt, 1, 0, 0, 0);
+ } else {
+ end_tt = *end_date->value;
+ }
/* If the end zone is not the same as the start zone, we convert it. */
priv->zone = start_zone;