aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-webkit-utils.c
diff options
context:
space:
mode:
authorMarco Barisione <marco.barisione@collabora.co.uk>2013-07-29 21:01:56 +0800
committerMarco Barisione <marco.barisione@collabora.co.uk>2013-08-20 18:03:05 +0800
commit89db427d713a8704e632776a1d7a628123cc82ff (patch)
tree72b28e9fd4260461ce4f7e9f59097f67e36c2d06 /libempathy-gtk/empathy-webkit-utils.c
parentd9f45de3b3da70e5d047313e0abb816d9f2fca3f (diff)
downloadgsoc2013-empathy-89db427d713a8704e632776a1d7a628123cc82ff.tar
gsoc2013-empathy-89db427d713a8704e632776a1d7a628123cc82ff.tar.gz
gsoc2013-empathy-89db427d713a8704e632776a1d7a628123cc82ff.tar.bz2
gsoc2013-empathy-89db427d713a8704e632776a1d7a628123cc82ff.tar.lz
gsoc2013-empathy-89db427d713a8704e632776a1d7a628123cc82ff.tar.xz
gsoc2013-empathy-89db427d713a8704e632776a1d7a628123cc82ff.tar.zst
gsoc2013-empathy-89db427d713a8704e632776a1d7a628123cc82ff.zip
string-parser: move everything except for _match_smiley(), to tp-aw
empathy_string_match_smiley() depends on other files and it's not needed by tp-account-widgets, so we can leave it in libempathy-gtk. https://bugzilla.gnome.org/show_bug.cgi?id=699492
Diffstat (limited to 'libempathy-gtk/empathy-webkit-utils.c')
-rw-r--r--libempathy-gtk/empathy-webkit-utils.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/libempathy-gtk/empathy-webkit-utils.c b/libempathy-gtk/empathy-webkit-utils.c
index 0fc319088..90dc28c17 100644
--- a/libempathy-gtk/empathy-webkit-utils.c
+++ b/libempathy-gtk/empathy-webkit-utils.c
@@ -24,6 +24,7 @@
#include <glib/gi18n-lib.h>
#include "empathy-smiley-manager.h"
+#include "empathy-string-parser.h"
#include "empathy-theme-adium.h"
#include "empathy-ui-utils.h"
@@ -32,8 +33,8 @@
static void
empathy_webkit_match_newline (const gchar *text,
gssize len,
- EmpathyStringReplace replace_func,
- EmpathyStringParser *sub_parsers,
+ TpawStringReplace replace_func,
+ TpawStringParser *sub_parsers,
gpointer user_data)
{
GString *string = user_data;
@@ -48,14 +49,14 @@ empathy_webkit_match_newline (const gchar *text,
{
if (text[i] == '\n')
{
- empathy_string_parser_substr (text + prev, i - prev,
+ tpaw_string_parser_substr (text + prev, i - prev,
sub_parsers, user_data);
g_string_append (string, "<br/>");
prev = i + 1;
}
}
- empathy_string_parser_substr (text + prev, i - prev,
+ tpaw_string_parser_substr (text + prev, i - prev,
sub_parsers, user_data);
}
@@ -74,22 +75,22 @@ empathy_webkit_replace_smiley (const gchar *text,
hit->path, (int)len, text, (int)len, text);
}
-static EmpathyStringParser string_parsers[] = {
- { empathy_string_match_link, empathy_string_replace_link },
+static TpawStringParser string_parsers[] = {
+ { tpaw_string_match_link, tpaw_string_replace_link },
{ empathy_webkit_match_newline, NULL },
- { empathy_string_match_all, empathy_string_replace_escaped },
+ { tpaw_string_match_all, tpaw_string_replace_escaped },
{ NULL, NULL}
};
-static EmpathyStringParser string_parsers_with_smiley[] = {
- { empathy_string_match_link, empathy_string_replace_link },
+static TpawStringParser string_parsers_with_smiley[] = {
+ { tpaw_string_match_link, tpaw_string_replace_link },
{ empathy_string_match_smiley, empathy_webkit_replace_smiley },
{ empathy_webkit_match_newline, NULL },
- { empathy_string_match_all, empathy_string_replace_escaped },
+ { tpaw_string_match_all, tpaw_string_replace_escaped },
{ NULL, NULL }
};
-EmpathyStringParser *
+TpawStringParser *
empathy_webkit_get_string_parser (gboolean smileys)
{
if (smileys)