aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamon Chaplin <damon@ximian.com>2001-10-30 22:14:59 +0800
committerDamon Chaplin <damon@src.gnome.org>2001-10-30 22:14:59 +0800
commit4ec29933d911ca99f4d762747224c89bffce9c1b (patch)
treeb49d580db58302d3445c9a1ed06c61e475c5010f
parent5bee06ce4a0bc2e1d48a1cd6d980683f2c37f94e (diff)
downloadgsoc2013-evolution-4ec29933d911ca99f4d762747224c89bffce9c1b.tar
gsoc2013-evolution-4ec29933d911ca99f4d762747224c89bffce9c1b.tar.gz
gsoc2013-evolution-4ec29933d911ca99f4d762747224c89bffce9c1b.tar.bz2
gsoc2013-evolution-4ec29933d911ca99f4d762747224c89bffce9c1b.tar.lz
gsoc2013-evolution-4ec29933d911ca99f4d762747224c89bffce9c1b.tar.xz
gsoc2013-evolution-4ec29933d911ca99f4d762747224c89bffce9c1b.tar.zst
gsoc2013-evolution-4ec29933d911ca99f4d762747224c89bffce9c1b.zip
set to the default timezone for DATE values, in case the user switches to
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. svn path=/trunk/; revision=14461
-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)