changeset 17961:e5525819d652

Finish emoticon support. You can now send smileys to yourself, they can be disabled, and compilation produces no smiley-related warnings.
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Sat, 21 Jul 2007 02:51:43 +0000
parents f61047bae7c0
children 8e351e08aba0
files libpurple/protocols/myspace/myspace.c libpurple/protocols/myspace/myspace.h
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/myspace/myspace.c	Sat Jul 21 02:33:11 2007 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Sat Jul 21 02:51:43 2007 +0000
@@ -1120,7 +1120,7 @@
     for (i = 0; emoticon_symbols[i] != NULL; ++i)
     {
 
-        replacement = g_strdup_printf("<i n=\"%s\">", emoticon_names[i]);
+        replacement = g_strdup_printf("<i n=\"%s\"/>", emoticon_names[i]);
 
         purple_debug_info("msim", "msim_convert_smileys_to_markup: %s->%s\n",
                 emoticon_symbols[i], replacement);
@@ -1157,7 +1157,7 @@
     markup = msim_convert_xml(session, raw,
             (MSIM_XMLNODE_CONVERT)(html_tag_to_msim_markup));
     
-    if (purple_account_get_bool(session->account, "smileys", TRUE))
+    if (purple_account_get_bool(session->account, "emoticons", TRUE))
     {
         /* Frees markup and allocates a new one. */
         markup = msim_convert_smileys_to_markup(markup);
--- a/libpurple/protocols/myspace/myspace.h	Sat Jul 21 02:33:11 2007 +0000
+++ b/libpurple/protocols/myspace/myspace.h	Sat Jul 21 02:51:43 2007 +0000
@@ -236,6 +236,7 @@
 void msim_markup_tag_to_html(MsimSession *, xmlnode *root, gchar **begin, gchar **end);
 void html_tag_to_msim_markup(MsimSession *, xmlnode *root, gchar **begin, gchar **end);
 gchar *msim_convert_xml(MsimSession *, const gchar *raw, MSIM_XMLNODE_CONVERT f);
+gchar *msim_convert_smileys_to_markup(gchar *before);
 
 /* High-level msim markup <=> html conversion functions. */
 gchar *msim_markup_to_html(MsimSession *, const gchar *raw);