pidgin: 37548765: It seems I need to write the smiley to t...
qulogic at pidgin.im
qulogic at pidgin.im
Sat Aug 22 23:35:41 EDT 2009
-----------------------------------------------------------------
Revision: 375487659d7425062cb32079e5be08ac45951bd8
Ancestor: e8d6fba406f02956d2f340bbc7b4d60502e954cc
Author: qulogic at pidgin.im
Date: 2009-08-23T03:31:52
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/375487659d7425062cb32079e5be08ac45951bd8
Modified files:
libpurple/protocols/msn/msn.c
ChangeLog:
It seems I need to write the smiley to the conversation for it to show up
locally, because it's not done for chats like in IMs.
References #10027.
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/msn.c 117827b9904ce7ae58d5c8e71fd6c2e50e4947e6
+++ libpurple/protocols/msn/msn.c db1ea88fe86a348e57fe2dc47b8a2a790d8b27eb
@@ -89,6 +89,7 @@ typedef struct
typedef struct
{
char *smile;
+ PurpleSmiley *ps;
MsnObject *obj;
} MsnEmoticon;
@@ -1143,6 +1144,7 @@ static GSList* msn_msg_grab_emoticons(co
emoticon = g_new0(MsnEmoticon, 1);
emoticon->smile = g_strdup(purple_smiley_get_shortcut(smiley));
+ emoticon->ps = smiley;
emoticon->obj = msn_object_new_from_image(img,
purple_imgstore_get_filename(img),
username, MSN_OBJECT_EMOTICON);
@@ -1165,7 +1167,7 @@ msn_send_im_message(MsnSession *session,
smileys = msn_msg_grab_emoticons(msg->body, username);
while (smileys) {
- smile = (MsnEmoticon*)smileys->data;
+ smile = (MsnEmoticon *)smileys->data;
emoticons = msn_msg_emoticon_add(emoticons, smile);
msn_emoticon_destroy(smile);
smileys = g_slist_delete_link(smileys, smileys);
@@ -1757,6 +1759,15 @@ msn_chat_send(PurpleConnection *gc, int
while (smileys) {
smile = (MsnEmoticon *)smileys->data;
emoticons = msn_msg_emoticon_add(emoticons, smile);
+ if (purple_conv_custom_smiley_add(swboard->conv, smile->smile,
+ "sha1", purple_smiley_get_checksum(smile->ps),
+ FALSE)) {
+ gconstpointer data;
+ size_t len;
+ data = purple_smiley_get_data(smile->ps, &len);
+ purple_conv_custom_smiley_write(swboard->conv, smile->smile, data, len);
+ purple_conv_custom_smiley_close(swboard->conv, smile->smile);
+ }
msn_emoticon_destroy(smile);
smileys = g_slist_delete_link(smileys, smileys);
}
More information about the Commits
mailing list