changeset 8515:0b0d70464cad

[gaim-migrate @ 9253] " If "Show graphical smileys" is disabled in preferences and you use the smiley button to enter a smiley in a conversation, it shows as a graphical smiley in the entry box, but as a text smiley in the conversation itself. This patch fixes that so the preferences is used." --Stu Tomlinson committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sun, 28 Mar 2004 17:57:32 +0000
parents ed1f3a8f0ccd
children 5b25f72c4723
files src/gtkconv.c src/gtkimhtml.c
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkconv.c	Sun Mar 28 17:18:06 2004 +0000
+++ b/src/gtkconv.c	Sun Mar 28 17:57:32 2004 +0000
@@ -5527,6 +5527,7 @@
 		gtkconv = GAIM_GTK_CONVERSATION(conv);
 
 		gtk_imhtml_show_smileys(GTK_IMHTML(gtkconv->imhtml), (gboolean)GPOINTER_TO_INT(value));
+		gtk_imhtml_show_smileys(GTK_IMHTML(gtkconv->entry), (gboolean)GPOINTER_TO_INT(value));
 	}
 }
 
--- a/src/gtkimhtml.c	Sun Mar 28 17:18:06 2004 +0000
+++ b/src/gtkimhtml.c	Sun Mar 28 17:57:32 2004 +0000
@@ -2931,6 +2931,11 @@
 	GtkTextChildAnchor *anchor;
 	char *unescaped = gaim_unescape_html(smiley);
 
+	if (!imhtml->show_smileys) {
+		gtk_text_buffer_insert_at_cursor(imhtml->text_buffer, smiley, strlen(smiley));
+		return;
+	}
+
 	gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &iter, ins);
 	anchor = gtk_text_buffer_create_child_anchor(imhtml->text_buffer, &iter);
 	g_object_set_data(G_OBJECT(anchor), "text_tag", unescaped);