aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2010-03-04 23:28:56 +0800
committerXavier Claessens <xclaesse@gmail.com>2010-03-04 23:28:56 +0800
commit7c9a7e0a126322fea64c7a4dfcd455400cafcbe8 (patch)
tree3870518a913af84dd43313045232e5ec7b55090a
parent207c3bdd45e280beb019153ca6c844178f6e331a (diff)
downloadgsoc2013-empathy-7c9a7e0a126322fea64c7a4dfcd455400cafcbe8.tar
gsoc2013-empathy-7c9a7e0a126322fea64c7a4dfcd455400cafcbe8.tar.gz
gsoc2013-empathy-7c9a7e0a126322fea64c7a4dfcd455400cafcbe8.tar.bz2
gsoc2013-empathy-7c9a7e0a126322fea64c7a4dfcd455400cafcbe8.tar.lz
gsoc2013-empathy-7c9a7e0a126322fea64c7a4dfcd455400cafcbe8.tar.xz
gsoc2013-empathy-7c9a7e0a126322fea64c7a4dfcd455400cafcbe8.tar.zst
gsoc2013-empathy-7c9a7e0a126322fea64c7a4dfcd455400cafcbe8.zip
Add a comment explaining what does empathy_add_link_markup, and don't make parser list static
-rw-r--r--libempathy-gtk/empathy-string-parser.c2
-rw-r--r--libempathy-gtk/empathy-string-parser.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-string-parser.c b/libempathy-gtk/empathy-string-parser.c
index 1f9f5f2ab..fa56a2d42 100644
--- a/libempathy-gtk/empathy-string-parser.c
+++ b/libempathy-gtk/empathy-string-parser.c
@@ -194,7 +194,7 @@ empathy_string_replace_escaped (const gchar *text,
gchar *
empathy_add_link_markup (const gchar *text)
{
- static EmpathyStringParser parsers[] = {
+ EmpathyStringParser parsers[] = {
{empathy_string_match_link, empathy_string_replace_link},
{empathy_string_match_all, empathy_string_replace_escaped},
{NULL, NULL}
diff --git a/libempathy-gtk/empathy-string-parser.h b/libempathy-gtk/empathy-string-parser.h
index aec741add..78a822652 100644
--- a/libempathy-gtk/empathy-string-parser.h
+++ b/libempathy-gtk/empathy-string-parser.h
@@ -82,6 +82,8 @@ empathy_string_replace_escaped (const gchar *text,
gpointer match_data,
gpointer user_data);
+/* Returns a new string with <a> html tag around links, and escape the rest.
+ * To be used with gtk_label_set_markup() for example */
gchar *
empathy_add_link_markup (const gchar *text);