aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/task-details-page.c
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2005-08-17 11:50:04 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2005-08-17 11:50:04 +0800
commit65c483fd06354745a0ee96fd0f4d94eb160a87c7 (patch)
tree5ed612fbcfd1eeaa49fe8c87c4b59bd1bbda8f5c /calendar/gui/dialogs/task-details-page.c
parent52706f8815d773bda03c0d02e472d2d076eee779 (diff)
downloadgsoc2013-evolution-65c483fd06354745a0ee96fd0f4d94eb160a87c7.tar
gsoc2013-evolution-65c483fd06354745a0ee96fd0f4d94eb160a87c7.tar.gz
gsoc2013-evolution-65c483fd06354745a0ee96fd0f4d94eb160a87c7.tar.bz2
gsoc2013-evolution-65c483fd06354745a0ee96fd0f4d94eb160a87c7.tar.lz
gsoc2013-evolution-65c483fd06354745a0ee96fd0f4d94eb160a87c7.tar.xz
gsoc2013-evolution-65c483fd06354745a0ee96fd0f4d94eb160a87c7.tar.zst
gsoc2013-evolution-65c483fd06354745a0ee96fd0f4d94eb160a87c7.zip
Fixes #311904
svn path=/trunk/; revision=30139
Diffstat (limited to 'calendar/gui/dialogs/task-details-page.c')
-rw-r--r--calendar/gui/dialogs/task-details-page.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c
index 649bdec1bf..01b0c3e0f2 100644
--- a/calendar/gui/dialogs/task-details-page.c
+++ b/calendar/gui/dialogs/task-details-page.c
@@ -416,21 +416,21 @@ task_details_page_fill_component (CompEditorPage *page, ECalComponent *comp)
&icalcomplete.month,
&icalcomplete.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->completed_date),
- &icalcomplete.hour,
- &icalcomplete.minute);
-
- /* COMPLETED today or before */
- icaltoday = icaltime_current_time_with_zone (zone);
- icaltimezone_convert_time (&icaltoday, zone,
- icaltimezone_get_utc_timezone());
-
- if (icaltime_compare_date_only (icalcomplete, icaltoday) > 0) {
- comp_editor_page_display_validation_error (page, _("Completed date is wrong"), priv->completed_date);
- return FALSE;
- }
-
if (date_set) {
+ e_date_edit_get_time_of_day (E_DATE_EDIT (priv->completed_date),
+ &icalcomplete.hour,
+ &icalcomplete.minute);
+
+ /* COMPLETED today or before */
+ icaltoday = icaltime_current_time_with_zone (zone);
+ icaltimezone_convert_time (&icaltoday, zone,
+ icaltimezone_get_utc_timezone());
+
+ if (icaltime_compare_date_only (icalcomplete, icaltoday) > 0) {
+ comp_editor_page_display_validation_error (page, _("Completed date is wrong"), priv->completed_date);
+ return FALSE;
+ }
+
/* COMPLETED must be in UTC, so we assume that the date in the
dialog is in the current timezone, and we now convert it
to UTC. FIXME: We should really use one timezone for the
@@ -438,7 +438,7 @@ task_details_page_fill_component (CompEditorPage *page, ECalComponent *comp)
changes the timezone, the COMPLETED date may get changed
as well. */
icaltimezone_convert_time (&icalcomplete, zone,
- icaltimezone_get_utc_timezone ());
+ icaltimezone_get_utc_timezone ());
e_cal_component_set_completed (comp, &icalcomplete);
} else {
e_cal_component_set_completed (comp, NULL);