changeset 7700:8a40952f5f67

[gaim-migrate @ 8345] This should make chats work again. Sorry, Luke. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Tue, 02 Dec 2003 16:27:54 +0000
parents 04f9c750657f
children 734736bad76c
files src/gtkconv.c src/gtkimhtml.c
diffstat 2 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkconv.c	Tue Dec 02 14:25:55 2003 +0000
+++ b/src/gtkconv.c	Tue Dec 02 16:27:54 2003 +0000
@@ -3579,10 +3579,11 @@
 	gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0);
 	gtk_widget_show(frame);
 
-	gtkconv->entry_buffer = gtk_text_buffer_new(NULL);
+	gtkconv->entry = gtk_imhtml_new(NULL, NULL);
+	gtkconv->entry_buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->entry));
 	g_object_set_data(G_OBJECT(gtkconv->entry_buffer), "user_data", conv);
-	gtkconv->entry = gtk_text_view_new_with_buffer(gtkconv->entry_buffer);
-
+	gtk_imhtml_set_editable(GTK_IMHTML(gtkconv->entry), TRUE);
+	
 	gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(gtkconv->entry), GTK_WRAP_WORD_CHAR);
 	gtk_widget_set_size_request(gtkconv->entry, -1,
 			MAX(gaim_prefs_get_int("/gaim/gtk/conversations/chat/entry_height"),
--- a/src/gtkimhtml.c	Tue Dec 02 14:25:55 2003 +0000
+++ b/src/gtkimhtml.c	Tue Dec 02 16:27:54 2003 +0000
@@ -1614,6 +1614,7 @@
 gtk_imhtml_clear (GtkIMHtml *imhtml)
 {
 	GtkTextIter start, end;
+	GList *del = imhtml->format_spans;
 	
 	gtk_text_buffer_get_start_iter(imhtml->text_buffer, &start);
 	gtk_text_buffer_get_end_iter(imhtml->text_buffer, &end);
@@ -1628,6 +1629,7 @@
 		g_free(span);
 		imhtml->format_spans = imhtml->format_spans->next;
 	}
+	g_list_free(del);
 	imhtml->edit.bold = NULL;
 	imhtml->edit.italic = NULL;
 	imhtml->edit.underline = NULL;