src/conversation.c

changeset 3035
5354475cd3f6
parent 3033
1f078ab46e76
child 3044
4afb69af09c8
--- 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

mercurial