diff options
author | Damon Chaplin <damon@ximian.com> | 2001-12-11 03:15:40 +0800 |
---|---|---|
committer | Damon Chaplin <damon@src.gnome.org> | 2001-12-11 03:15:40 +0800 |
commit | 9786b8ab7d75e20d28b7b3f91b403d21a28fd3cf (patch) | |
tree | 9558d91eddaf4ba45f1f1835e5f8cff6d3e8cc48 /libical/src | |
parent | 081f6dbb1bbf4add00bfb67b3e05bba4a432d56e (diff) | |
download | gsoc2013-evolution-9786b8ab7d75e20d28b7b3f91b403d21a28fd3cf.tar gsoc2013-evolution-9786b8ab7d75e20d28b7b3f91b403d21a28fd3cf.tar.gz gsoc2013-evolution-9786b8ab7d75e20d28b7b3f91b403d21a28fd3cf.tar.bz2 gsoc2013-evolution-9786b8ab7d75e20d28b7b3f91b403d21a28fd3cf.tar.lz gsoc2013-evolution-9786b8ab7d75e20d28b7b3f91b403d21a28fd3cf.tar.xz gsoc2013-evolution-9786b8ab7d75e20d28b7b3f91b403d21a28fd3cf.tar.zst gsoc2013-evolution-9786b8ab7d75e20d28b7b3f91b403d21a28fd3cf.zip |
if all we have is the TZID, see if it is one of our TZIDs and if so get
2001-12-10 Damon Chaplin <damon@ximian.com>
* src/libical/icaltimezone.c (icaltimezone_get_display_name): if all
we have is the TZID, see if it is one of our TZIDs and if so get the
city name out of it. Fixes bug #16571.
svn path=/trunk/; revision=14957
Diffstat (limited to 'libical/src')
-rw-r--r-- | libical/src/libical/icaltimezone.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/libical/src/libical/icaltimezone.c b/libical/src/libical/icaltimezone.c index f2e33d3596..6303bec2f1 100644 --- a/libical/src/libical/icaltimezone.c +++ b/libical/src/libical/icaltimezone.c @@ -1226,8 +1226,26 @@ icaltimezone_get_display_name (icaltimezone *zone) display_name = icaltimezone_get_location (zone); if (!display_name) display_name = icaltimezone_get_tznames (zone); - if (!display_name) + if (!display_name) { display_name = icaltimezone_get_tzid (zone); + /* Outlook will strip out X-LIC-LOCATION property and so all + we get back in the iTIP replies is the TZID. So we see if + this is one of our TZIDs and if so we jump to the city name + at the end of it. */ + if (display_name + && !strncmp (display_name, TZID_PREFIX, TZID_PREFIX_LEN)) { + /* Get the location, which is after the 3rd '/' char. */ + char *p; + int num_slashes = 0; + for (p = display_name; *p; p++) { + if (*p == '/') { + num_slashes++; + if (num_slashes == 3) + return p + 1; + } + } + } + } return display_name; } |