- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
/*
* This GtkIMHtml has the maximum number of smileys allowed, so don't
* add any more. We do this for performance reasons, because smileys
* 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, 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, unescaped, -1);
g_free(unescaped);
return;
}
Вот такой прикол от Pidgin. Больше 30 смайлов в сообщении и 300 в диалоге - низя. Захардкодили, ибо стыдно, что тормозит. А оно действительно тормозит.
Комментарии (9) RSS
Добавить комментарий