aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-tasks.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/e-tasks.c')
-rw-r--r--calendar/gui/e-tasks.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c
index 02cf6b3f47..d6c0f4a64e 100644
--- a/calendar/gui/e-tasks.c
+++ b/calendar/gui/e-tasks.c
@@ -328,7 +328,7 @@ e_tasks_open (ETasks *tasks,
message = g_strdup_printf (_("Opening tasks at %s"), file);
calendar_model_set_status_message (
- e_calendar_table_get_model (priv->tasks_view),
+ e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view)),
message);
g_free (message);
@@ -378,16 +378,24 @@ cal_opened_cb (CalClient *client,
{
ETasks *tasks;
ETasksPrivate *priv;
+ char *location;
+ icaltimezone *zone;
tasks = E_TASKS (data);
priv = tasks->priv;
calendar_model_set_status_message (
- e_calendar_table_get_model (priv->tasks_view), NULL);
+ e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view)), NULL);
switch (status) {
case CAL_CLIENT_OPEN_SUCCESS:
/* Everything is OK */
+
+ /* Set the client's default timezone, if we have one. */
+ location = calendar_config_get_timezone ();
+ zone = icaltimezone_get_builtin_timezone (location);
+ if (zone)
+ cal_client_set_default_timezone (client, zone);
return;
case CAL_CLIENT_OPEN_ERROR:
@@ -632,10 +640,19 @@ e_tasks_update_all_config_settings (void)
ETasks *tasks;
ETasksPrivate *priv;
GList *elem;
+ char *location;
+ icaltimezone *zone;
+
+ location = calendar_config_get_timezone ();
+ zone = icaltimezone_get_builtin_timezone (location);
for (elem = all_tasks; elem; elem = elem->next) {
tasks = E_TASKS (elem->data);
priv = tasks->priv;
+
calendar_config_configure_e_calendar_table (E_CALENDAR_TABLE (priv->tasks_view));
+
+ if (zone)
+ cal_client_set_default_timezone (priv->client, zone);
}
}