diff options
author | Damon Chaplin <damon@ximian.com> | 2001-07-17 09:34:49 +0800 |
---|---|---|
committer | Damon Chaplin <damon@src.gnome.org> | 2001-07-17 09:34:49 +0800 |
commit | 65f2e3d2a3de395977fbd39af0baac0b61504ee5 (patch) | |
tree | ca20ac10a7083865305fd7dcfa15fd3b050950ce /calendar/gui/dialogs/task-page.c | |
parent | 3b8e07c5b87acbda0f09155aa30bf9cc5e0ae8fc (diff) | |
download | gsoc2013-evolution-65f2e3d2a3de395977fbd39af0baac0b61504ee5.tar gsoc2013-evolution-65f2e3d2a3de395977fbd39af0baac0b61504ee5.tar.gz gsoc2013-evolution-65f2e3d2a3de395977fbd39af0baac0b61504ee5.tar.bz2 gsoc2013-evolution-65f2e3d2a3de395977fbd39af0baac0b61504ee5.tar.lz gsoc2013-evolution-65f2e3d2a3de395977fbd39af0baac0b61504ee5.tar.xz gsoc2013-evolution-65f2e3d2a3de395977fbd39af0baac0b61504ee5.tar.zst gsoc2013-evolution-65f2e3d2a3de395977fbd39af0baac0b61504ee5.zip |
try to use builtin timezones before getting them from the server. When
2001-07-16 Damon Chaplin <damon@ximian.com>
* gui/dialogs/task-page.c (task_page_fill_widgets):
* gui/dialogs/event-page.c (event_page_fill_widgets): try to use
builtin timezones before getting them from the server. When creating
new events/tasks the timezones may not be on the server.
* gui/dialogs/event-page.c (event_page_fill_widgets): for all-day
events we subtract a day from the end date rather than add it.
* gui/dialogs/e-timezone-dialog.c (on_map_leave): ignore the event
if it isn't a GDK_CROSSING_NORMAL event. For some reason we are getting
leave events when the button is pressed, which meant that selecting
timezones in the map didn't work.
* gui/dialogs/comp-editor-util.c (comp_editor_dates):
* gui/print.c (print_date_label): only free icaltimetype if not NULL.
svn path=/trunk/; revision=11144
Diffstat (limited to 'calendar/gui/dialogs/task-page.c')
-rw-r--r-- | calendar/gui/dialogs/task-page.c | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index 2ba37b7c6a..e50f9f9681 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -395,11 +395,18 @@ task_page_fill_widgets (CompEditorPage *page, CalComponent *comp) e_date_edit_set_time (E_DATE_EDIT (priv->due_date), -1); } - get_tz_status = cal_client_get_timezone (page->client, d.tzid, &zone); - /* FIXME: Handle error better. */ - if (get_tz_status != CAL_CLIENT_GET_SUCCESS) - g_warning ("Couldn't get timezone from server: %s", - d.tzid ? d.tzid : ""); + /* Note that if we are creating a new task, the timezones may not be + on the server, so we try to get the builtin timezone with the TZID + first. */ + zone = icaltimezone_get_builtin_timezone_from_tzid (d.tzid); + if (!zone) { + get_tz_status = cal_client_get_timezone (page->client, d.tzid, + &zone); + /* FIXME: Handle error better. */ + if (get_tz_status != CAL_CLIENT_GET_SUCCESS) + g_warning ("Couldn't get timezone from server: %s", + d.tzid ? d.tzid : ""); + } e_timezone_entry_set_timezone (E_TIMEZONE_ENTRY (priv->due_timezone), zone); @@ -419,11 +426,15 @@ task_page_fill_widgets (CompEditorPage *page, CalComponent *comp) e_date_edit_set_time (E_DATE_EDIT (priv->start_date), -1); } - get_tz_status = cal_client_get_timezone (page->client, d.tzid, &zone); - /* FIXME: Handle error better. */ - if (get_tz_status != CAL_CLIENT_GET_SUCCESS) - g_warning ("Couldn't get timezone from server: %s", - d.tzid ? d.tzid : ""); + zone = icaltimezone_get_builtin_timezone_from_tzid (d.tzid); + if (!zone) { + get_tz_status = cal_client_get_timezone (page->client, d.tzid, + &zone); + /* FIXME: Handle error better. */ + if (get_tz_status != CAL_CLIENT_GET_SUCCESS) + g_warning ("Couldn't get timezone from server: %s", + d.tzid ? d.tzid : ""); + } e_timezone_entry_set_timezone (E_TIMEZONE_ENTRY (priv->start_timezone), zone); |