aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorTomas Popela <tpopela@redhat.com>2014-07-16 16:46:43 +0800
committerTomas Popela <tpopela@redhat.com>2014-07-16 16:46:43 +0800
commit65e07523570f20a4500bc7c1ff8acf7c4dd36a03 (patch)
tree37044eb283d18e1036d72a74b203bfdd54cf8337 /addressbook
parent930a4dffa7c551dc440b3aaf3ec70f569c6b4c15 (diff)
downloadgsoc2013-evolution-65e07523570f20a4500bc7c1ff8acf7c4dd36a03.tar
gsoc2013-evolution-65e07523570f20a4500bc7c1ff8acf7c4dd36a03.tar.gz
gsoc2013-evolution-65e07523570f20a4500bc7c1ff8acf7c4dd36a03.tar.bz2
gsoc2013-evolution-65e07523570f20a4500bc7c1ff8acf7c4dd36a03.tar.lz
gsoc2013-evolution-65e07523570f20a4500bc7c1ff8acf7c4dd36a03.tar.xz
gsoc2013-evolution-65e07523570f20a4500bc7c1ff8acf7c4dd36a03.tar.zst
gsoc2013-evolution-65e07523570f20a4500bc7c1ff8acf7c4dd36a03.zip
Images in contact preview are not shown with webkitgtk3 2.4.x
We have to unescape the image uri when running with webkitgtk3 2.4.x and not just in versions prior to 2.2.x
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/gui/widgets/eab-contact-formatter.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/addressbook/gui/widgets/eab-contact-formatter.c b/addressbook/gui/widgets/eab-contact-formatter.c
index 34b3a5ed3c..30b397d1c6 100644
--- a/addressbook/gui/widgets/eab-contact-formatter.c
+++ b/addressbook/gui/widgets/eab-contact-formatter.c
@@ -543,15 +543,15 @@ render_title_block (EABContactFormatter *formatter,
} else if (photo && photo->type == E_CONTACT_PHOTO_TYPE_URI && photo->data.uri && *photo->data.uri) {
gboolean is_local = g_str_has_prefix (photo->data.uri, "file://");
const gchar *uri = photo->data.uri;
- /* WebKit 2.2 doesn't re-escape URIs, thus do this only for versions before this */
- #if !WEBKIT_CHECK_VERSION(2,2,0)
+ /* WebKit 2.2.x doesn't re-escape URIs, thus do this for versions before and after this */
+ #if !(WEBKIT_MAJOR_VERSION == 2 && WEBKIT_MINOR_VERSION == 2)
gchar *unescaped = g_uri_unescape_string (photo->data.uri, NULL);
uri = unescaped;
#endif
g_string_append_printf (
buffer, "<img border=\"1\" src=\"%s%s\">",
is_local ? "evo-" : "", uri);
- #if !WEBKIT_CHECK_VERSION(2,2,0)
+ #if !(WEBKIT_MAJOR_VERSION == 2 && WEBKIT_MINOR_VERSION == 2)
g_free (unescaped);
#endif
}
@@ -1061,8 +1061,8 @@ render_compact (EABContactFormatter *formatter,
photo->data.uri && *photo->data.uri) {
gboolean is_local = g_str_has_prefix (photo->data.uri, "file://");
const gchar *uri = photo->data.uri;
- /* WebKit 2.2 doesn't re-escape URIs, thus do this only for versions before this */
- #if !WEBKIT_CHECK_VERSION(2,2,0)
+ /* WebKit 2.2.x doesn't re-escape URIs, thus do this for versions before and after this */
+ #if !(WEBKIT_MAJOR_VERSION == 2 && WEBKIT_MINOR_VERSION == 2)
gchar *unescaped = g_uri_unescape_string (photo->data.uri, NULL);
uri = unescaped;
#endif
@@ -1071,7 +1071,7 @@ render_compact (EABContactFormatter *formatter,
"<img width=\"%d\" height=\"%d\" src=\"%s%s\">",
calced_width, calced_height,
is_local ? "evo-" : "", uri);
- #if !WEBKIT_CHECK_VERSION(2,2,0)
+ #if !(WEBKIT_MAJOR_VERSION == 2 && WEBKIT_MINOR_VERSION == 2)
g_free (unescaped);
#endif
} else {