Mercurial > pidgin
diff src/conversation.c @ 829:9a123b171f46
[gaim-migrate @ 839]
yay. i have a secret. but basically this should fix most outstanding libfaim issues in gaim.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sat, 02 Sep 2000 02:41:57 +0000 |
parents | fe2e1ad4495b |
children | 60284aef22f0 |
line wrap: on
line diff
--- a/src/conversation.c Fri Sep 01 23:45:43 2000 +0000 +++ b/src/conversation.c Sat Sep 02 02:41:57 2000 +0000 @@ -1059,31 +1059,32 @@ void write_html_with_smileys(GtkWidget *window, GtkWidget *html, char *what) { int y = 0; - char buf2[BUF_LONG]; + char *buf2 = g_strdup(what); int i; GdkPixmap *face; - for (i = 0; i < strlen(what); i++) - { - int len; - if ((face = is_smiley(window, &what[i], &len)) != NULL) { - buf2[y] = 0; - gtk_html_append_text(GTK_HTML(html), buf2, (display_options & OPT_DISP_IGNORE_COLOUR) ? HTML_OPTION_NO_COLOURS : 0); - gtk_html_add_pixmap(GTK_HTML(html), face, 0, 0); - y = 0; - i += len - 1; - } else { - buf2[y] = what[i]; - y++; + for (i = 0; i < strlen(what); i++) + { + int len; + if ((face = is_smiley(window, &what[i], &len)) != NULL) { + buf2[y] = 0; + gtk_html_append_text(GTK_HTML(html), buf2, (display_options & OPT_DISP_IGNORE_COLOUR) ? HTML_OPTION_NO_COLOURS : 0); + gtk_html_add_pixmap(GTK_HTML(html), face, 0, 0); + y = 0; + i += len - 1; + } else { + buf2[y] = what[i]; + y++; - } - } + } + } - if (y) - { - buf2[y] = 0; - gtk_html_append_text(GTK_HTML(html), buf2, (display_options & OPT_DISP_IGNORE_COLOUR) ? HTML_OPTION_NO_COLOURS : 0); - } + if (y) + { + buf2[y] = 0; + gtk_html_append_text(GTK_HTML(html), buf2, (display_options & OPT_DISP_IGNORE_COLOUR) ? HTML_OPTION_NO_COLOURS : 0); + } + g_free(buf2); } /* this is going to be interesting since the conversation could either be a