Mercurial > pidgin
diff src/conversation.c @ 3035:0f1766887ddd
[gaim-migrate @ 3048]
Maybe this totally sucks, maybe it doesn't. If you like this, please let me know.
If you have geniunely sincere constructive criticism, then approach me in a nic way.
If you think it sucks then you can build yourself a wee little bridge and get the hell on over it.
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Wed, 13 Mar 2002 04:06:23 +0000 |
parents | 1143524a2eaf |
children | e68e2ba82310 |
line wrap: on
line diff
--- a/src/conversation.c Tue Mar 12 21:22:56 2002 +0000 +++ b/src/conversation.c Wed Mar 13 04:06:23 2002 +0000 @@ -86,6 +86,9 @@ static void update_checkbox(struct conversation *); static void remove_checkbox(struct conversation *); +static void update_smilies(struct conversation *c); + + /*------------------------------------------------------------------------*/ /* Helpers */ /*------------------------------------------------------------------------*/ @@ -176,6 +179,7 @@ conversations = g_list_append(conversations, c); show_conv(c); update_icon(c); + update_smilies(c); update_checkbox(c); plugin_event(event_new_conversation, name, 0, 0, 0); return c; @@ -933,6 +937,7 @@ if (!c->gc) return; + buf2 = gtk_editable_get_chars(GTK_EDITABLE(c->entry), 0, -1); limit = 32 * 1024; /* you shouldn't be sending more than 32k in your messages. that's a book. */ buf = g_malloc(limit); @@ -3247,6 +3252,23 @@ #endif } +void update_smilies(struct conversation *c) +{ + GSList *smilies; + + if (c->gc->prpl->smiley_list) { + smilies = c->gc->prpl->smiley_list(); + + while (smilies) { + struct _prpl_smiley *smile = + (struct _prpl_smiley *)smilies->data; + + gtk_imhtml_associate_smiley(GTK_IMHTML(c->text), smile->key, smile->xpm); + smilies = g_slist_next(smilies); + } + } +} + void update_icon(struct conversation *c) { #if USE_PIXBUF