aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog5
-rw-r--r--calendar/gui/dialogs/task-page.c19
2 files changed, 14 insertions, 10 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 2b755e13da..bf6752ea41 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,10 @@
2001-10-30 Damon Chaplin <damon@ximian.com>
+ * gui/dialogs/task-page.c (task_page_fill_widgets): set to the default
+ timezone for DATE values, in case the user switches to a DATE-TIME.
+
+2001-10-30 Damon Chaplin <damon@ximian.com>
+
* gui/dialogs/task-page.c: handle DATE values for Start and Due dates.
2001-10-30 Damon Chaplin <damon@ximian.com>
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index c7243c9ede..17dec0d212 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -310,7 +310,8 @@ task_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
CalClientGetStatus get_tz_status;
GSList *l;
const char *categories;
- icaltimezone *zone;
+ icaltimezone *zone, *default_zone;
+ char *location;
tpage = TASK_PAGE (page);
priv = tpage->priv;
@@ -333,6 +334,9 @@ task_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
}
cal_component_free_text_list (l);
+ location = calendar_config_get_timezone ();
+ default_zone = icaltimezone_get_builtin_timezone (location);
+
/* Due Date. */
cal_component_get_due (comp, &d);
zone = NULL;
@@ -344,22 +348,19 @@ task_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
if (due_tt->is_date) {
e_date_edit_set_time_of_day (E_DATE_EDIT (priv->due_date),
-1, -1);
-
+ zone = default_zone;
} else {
e_date_edit_set_time_of_day (E_DATE_EDIT (priv->due_date),
due_tt->hour,
due_tt->minute);
}
} else {
- char *location;
-
e_date_edit_set_time (E_DATE_EDIT (priv->due_date), -1);
/* If no time is set, we use the default timezone, so the
user usually doesn't have to set this when they set the
date. */
- location = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (location);
+ zone = default_zone;
}
/* Note that if we are creating a new task, the timezones may not be
@@ -392,21 +393,19 @@ task_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
if (start_tt->is_date) {
e_date_edit_set_time_of_day (E_DATE_EDIT (priv->start_date),
-1, -1);
+ zone = default_zone;
} else {
e_date_edit_set_time_of_day (E_DATE_EDIT (priv->start_date),
start_tt->hour,
start_tt->minute);
}
} else {
- char *location;
-
e_date_edit_set_time (E_DATE_EDIT (priv->start_date), -1);
/* If no time is set, we use the default timezone, so the
user usually doesn't have to set this when they set the
date. */
- location = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (location);
+ zone = default_zone;
}
if (!zone)