pidgin: 12cc2cc3: jabber: Don't print the smiley shortcut ...

malu at pidgin.im malu at pidgin.im
Wed Feb 3 16:40:29 EST 2010


-----------------------------------------------------------------
Revision: 12cc2cc3c1e0012329832ea2d170dca5b31f8b9b
Ancestor: 884bb785d674029cb52e46cb82a86241df13bf46
Author: malu at pidgin.im
Date: 2010-02-03T21:34:41
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/12cc2cc3c1e0012329832ea2d170dca5b31f8b9b

Modified files:
        libpurple/protocols/jabber/message.c

ChangeLog: 

jabber: Don't print the smiley shortcut in the error message when trying to
send a too large custom smiley, since the shortcut get substituded in the
error message, and I'm not sure we want that...

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/message.c	6d343217b6bb0743d556cf3d8fe5609635aa7cae
+++ libpurple/protocols/jabber/message.c	c309a5a8b0bc3452cf3bc9d014f0575e060b223e
@@ -985,6 +985,7 @@ jabber_message_smileyfy_xhtml(JabberMess
 			gchar *smileyfied_xhtml = NULL;
 			const GList *iterator;
 			GList *valid_smileys = NULL;
+			gboolean has_too_large_smiley = FALSE;
 			
 			for (iterator = found_smileys; iterator ;
 				iterator = g_list_next(iterator)) {
@@ -1011,15 +1012,16 @@ jabber_message_smileyfy_xhtml(JabberMess
 					}
 					valid_smileys = g_list_append(valid_smileys, smiley);
 				} else {
-					gchar *msg =
-						g_strdup_printf(_("Custom smiley with shortcut %s is too large to send."),
-						    purple_smiley_get_shortcut(smiley));
-					purple_conversation_write(conv, NULL, msg,
-					    PURPLE_MESSAGE_ERROR, time(NULL));
-					g_free(msg);
+					has_too_large_smiley = TRUE;
 				}				
 			}
 
+			if (has_too_large_smiley) {
+				purple_conversation_write(conv, NULL,
+				    _("A custom smiley in the message is too large to send."),
+					PURPLE_MESSAGE_ERROR, time(NULL));
+			}
+
 			smileyfied_xhtml =
 				jabber_message_get_smileyfied_xhtml(xhtml, valid_smileys);
 			g_list_free(found_smileys);


More information about the Commits mailing list