diff src/buddy_chat.c @ 1428:00b3d02a2168

[gaim-migrate @ 1438] gtkhtml has gotten replaced by gtkimhtml. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 26 Jan 2001 02:02:36 +0000
parents f6b0cf1f4c3b
children 5c67b8794991
line wrap: on
line diff
--- a/src/buddy_chat.c	Thu Jan 25 20:31:12 2001 +0000
+++ b/src/buddy_chat.c	Fri Jan 26 02:02:36 2001 +0000
@@ -28,7 +28,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <gtk/gtk.h>
-#include "gtkhtml.h"
+#include "gtkimhtml.h"
 #include "gtkspell.h"
 #include <gdk/gdkkeysyms.h>
 
@@ -39,6 +39,9 @@
 #include "pixmaps/join.xpm"
 #include "pixmaps/close.xpm"
 
+#include "pixmaps/luke03.xpm"
+#include "pixmaps/oneeye.xpm"
+
 static GtkWidget *joinchat;
 static struct gaim_connection *joinchatgc;
 static GtkWidget *entry;
@@ -696,12 +699,20 @@
 	gtk_widget_set_usize(sw, 320, 160);
 	gtk_widget_show(sw);
 
-	text = gtk_html_new(NULL, NULL);
+	text = gtk_imhtml_new(NULL, NULL);
 	b->text = text;
 	gtk_container_add(GTK_CONTAINER(sw), text);
+	GTK_LAYOUT(text)->hadjustment->step_increment = 10.0;
+	GTK_LAYOUT(text)->vadjustment->step_increment = 10.0;
+	if (!(display_options & OPT_DISP_SHOW_SMILEY))
+		gtk_imhtml_show_smileys(GTK_IMHTML(text), FALSE);
+	if (display_options & OPT_DISP_SHOW_TIME)
+		gtk_imhtml_show_comments(GTK_IMHTML(text), TRUE);
+	gtk_signal_connect(GTK_OBJECT(text), "url_clicked", GTK_SIGNAL_FUNC(open_url_nw), NULL);
+	gtk_imhtml_associate_smiley(GTK_IMHTML(text), "C:)", luke03_xpm);
+	gtk_imhtml_associate_smiley(GTK_IMHTML(text), "C:-)", luke03_xpm);
+	gtk_imhtml_associate_smiley(GTK_IMHTML(text), "O-)", oneeye_xpm);
 	gtk_widget_show(text);
-	GTK_HTML(text)->hadj->step_increment = 10.0;
-	GTK_HTML(text)->vadj->step_increment = 10.0;
 
 	lbox = gtk_vbox_new(FALSE, 5);
 	gtk_paned_pack2(GTK_PANED(hpaned), lbox, TRUE, TRUE);