aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2010-03-10 18:41:29 +0800
committerXavier Claessens <xclaesse@gmail.com>2010-03-10 19:04:57 +0800
commit5601d115d7e74b78dc1a884902c08c23be7626a8 (patch)
tree3e099c4d352c1acc6cb7909b780eb2d98b13c915
parent53a27a44ec3180efe29ed24f31091ecfd0bda3ad (diff)
downloadgsoc2013-empathy-5601d115d7e74b78dc1a884902c08c23be7626a8.tar
gsoc2013-empathy-5601d115d7e74b78dc1a884902c08c23be7626a8.tar.gz
gsoc2013-empathy-5601d115d7e74b78dc1a884902c08c23be7626a8.tar.bz2
gsoc2013-empathy-5601d115d7e74b78dc1a884902c08c23be7626a8.tar.lz
gsoc2013-empathy-5601d115d7e74b78dc1a884902c08c23be7626a8.tar.xz
gsoc2013-empathy-5601d115d7e74b78dc1a884902c08c23be7626a8.tar.zst
gsoc2013-empathy-5601d115d7e74b78dc1a884902c08c23be7626a8.zip
Disable empathy_add_link_markup() if linked to an old GTK version
Using links in labels could make a freeze, see GNOME #612066
-rw-r--r--libempathy-gtk/empathy-string-parser.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-string-parser.c b/libempathy-gtk/empathy-string-parser.c
index 5c3fb1972..691263a99 100644
--- a/libempathy-gtk/empathy-string-parser.c
+++ b/libempathy-gtk/empathy-string-parser.c
@@ -203,6 +203,14 @@ empathy_add_link_markup (const gchar *text)
g_return_val_if_fail (text != NULL, NULL);
+ /* GtkLabel with links could make infinite loop because of
+ * GNOME bug #612066. It is fixed in GTK >= 2.18.8 and GTK >= 2.19.7.
+ * FIXME: Remove this check once we have an hard dep on GTK 2.20 */
+ if (!gtk_check_version (2, 18, 8) ||
+ (gtk_minor_version == 19 && gtk_micro_version < 7)) {
+ return g_markup_escape_text (text, -1);
+ }
+
string = g_string_sized_new (strlen (text));
empathy_string_parser_substr (text, -1, parsers, string);