pidgin: 3f7ce097: gtkimhtml: Display "<3" instead of "<..
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Tue Nov 30 01:10:37 EST 2010
----------------------------------------------------------------------
Revision: 3f7ce0979147c5415dbc19906d2fd83bc5b5bfd0
Parent: 5cbaf3c8817820dc12f258a56398157a73c4cc40
Author: darkrain42 at pidgin.im
Date: 11/30/10 01:06:14
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/3f7ce0979147c5415dbc19906d2fd83bc5b5bfd0
Changelog:
gtkimhtml: Display "<3" instead of "<3" after too many smileys in convo
I encountered this in a long-lived, active MUC. Interestingly, this may have
persisted even after I disabled smileys and restarted (I'm unsure whether I
restarted or not). I also don't know why this works, other than it does.
Changes against parent 5cbaf3c8817820dc12f258a56398157a73c4cc40
patched ChangeLog
patched pidgin/gtkimhtml.c
-------------- next part --------------
============================================================
--- ChangeLog 4b18c939866c750f499ddb350b8e7452b18fd3dd
+++ ChangeLog 431e3d00c063849508718dcf6c89836e963f24fe
@@ -5,6 +5,12 @@ version 2.7.8 (??/??/????):
* Fix the exceptions in purple-remote on Python 2.6+. (Ari Pollak)
(#12151)
+ Pidgin:
+ * When a conversation has reached the maximum limit on the number
+ of smileys, display the text representation of the smiley properly
+ when it contains HTML-escapable characters (e.g. "<3" was previously
+ displayed as "<3").
+
libpurple:
* Fix multipart parsing when '=' is included in the boundary for
purple_mime_document_parse. (Jakub Adam) (#11598)
============================================================
--- pidgin/gtkimhtml.c b582b8f420d6a80e0f655f176a4309e9771d4682
+++ pidgin/gtkimhtml.c 8b230b04d758d4fadb4d4455510ead4a705925f1
@@ -4905,18 +4905,20 @@ void gtk_imhtml_insert_smiley_at_iter(Gt
* are apparently pretty inefficient. Hopefully we can remove this
* restriction when we're using a better HTML widget.
*/
+ unescaped = purple_unescape_html(smiley);
numsmileys_thismsg = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(imhtml), "gtkimhtml_numsmileys_thismsg"));
if (numsmileys_thismsg >= 30) {
- gtk_text_buffer_insert(imhtml->text_buffer, iter, smiley, -1);
+ gtk_text_buffer_insert(imhtml->text_buffer, iter, unescaped, -1);
+ g_free(unescaped);
return;
}
numsmileys_total = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(imhtml), "gtkimhtml_numsmileys_total"));
if (numsmileys_total >= 300) {
- gtk_text_buffer_insert(imhtml->text_buffer, iter, smiley, -1);
+ gtk_text_buffer_insert(imhtml->text_buffer, iter, unescaped, -1);
+ g_free(unescaped);
return;
}
- unescaped = purple_unescape_html(smiley);
imhtml_smiley = gtk_imhtml_smiley_get(imhtml, sml, unescaped);
if (imhtml->format_functions & GTK_IMHTML_SMILEY) {
@@ -4991,7 +4993,7 @@ void gtk_imhtml_insert_smiley_at_iter(Gt
g_object_set_data(G_OBJECT(imhtml), "gtkimhtml_numsmileys_thismsg", GINT_TO_POINTER(numsmileys_thismsg + 1));
g_object_set_data(G_OBJECT(imhtml), "gtkimhtml_numsmileys_total", GINT_TO_POINTER(numsmileys_total + 1));
} else {
- gtk_text_buffer_insert(imhtml->text_buffer, iter, smiley, -1);
+ gtk_text_buffer_insert(imhtml->text_buffer, iter, unescaped, -1);
}
if (ebox) {
More information about the Commits
mailing list