changeset 907:08d5037c9296

[gaim-migrate @ 917] chat fixes, and a possible gtkhtml fix? (it doesn't hurt) committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 14 Sep 2000 21:04:59 +0000
parents 7b976e5e1c3a
children d0527e1d2050
files src/buddy_chat.c src/conversation.c src/convo.h src/gtkhtml.c
diffstat 4 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/buddy_chat.c	Thu Sep 14 18:50:04 2000 +0000
+++ b/src/buddy_chat.c	Thu Sep 14 21:04:59 2000 +0000
@@ -679,6 +679,8 @@
 	gtk_window_set_focus(GTK_WINDOW(win), chatentry);
 
 	gtk_signal_connect(GTK_OBJECT(win), "destroy", GTK_SIGNAL_FUNC(close_callback),b);
+	gtk_signal_connect(GTK_OBJECT(chatentry), "insert-text", GTK_SIGNAL_FUNC(check_spelling), chatentry);
+	gtk_signal_connect(GTK_OBJECT(chatentry), "key_press_event", GTK_SIGNAL_FUNC(entry_key_pressed), chatentry);
 
 	b->font_dialog = NULL;
 	b->fg_color_dialog = NULL;	
--- a/src/conversation.c	Thu Sep 14 18:50:04 2000 +0000
+++ b/src/conversation.c	Thu Sep 14 21:04:59 2000 +0000
@@ -722,8 +722,7 @@
 	g_free(buf);
 }
 
-static int
-entry_key_pressed(GtkWidget *w, GtkWidget *entry)
+int entry_key_pressed(GtkWidget *w, GtkWidget *entry)
 {
         check_everything(w);
         return TRUE;
@@ -1374,7 +1373,7 @@
 
 
 
-static void check_spelling( GtkEditable * editable, gchar * new_text,
+void check_spelling( GtkEditable * editable, gchar * new_text,
                                                           gint length, gint * position,
                                                           gpointer data )
 {
--- a/src/convo.h	Thu Sep 14 18:50:04 2000 +0000
+++ b/src/convo.h	Thu Sep 14 21:04:59 2000 +0000
@@ -56,6 +56,8 @@
 extern void insert_smiley(GtkWidget *, struct conversation *);
 /* sound is handled by set_option */
 extern gboolean keypress_callback(GtkWidget *, GdkEventKey *, struct conversation *);
+extern void check_spelling( GtkEditable *, gchar *, gint, gint *, gpointer);
+extern int entry_key_pressed(GtkWidget *, GtkWidget *);
 
 extern GtkWidget *build_conv_toolbar(struct conversation *);
 
--- a/src/gtkhtml.c	Thu Sep 14 18:50:04 2000 +0000
+++ b/src/gtkhtml.c	Thu Sep 14 21:04:59 2000 +0000
@@ -2089,7 +2089,6 @@
 	}
 	else if (hb->type == HTML_BIT_SEP)
 	{
-
 		gdk_draw_line(html->html_area, gc, hb->x + 2,
 					  hb->y - html->yoffset - (hb->height / 2 - 1),
 					  hb->x + hb->width,
@@ -2098,6 +2097,11 @@
 	}
 	else if (hb->type == HTML_BIT_PIXMAP)
 	{
+		area.x = hb->x - html->xoffset;
+		area.y = hb->y - hb->height + 5 - html->yoffset;
+		area.width = hb->width + 2;
+		area.height = hb->height;
+		clear_area(html, &area);
 		gdk_gc_set_background(gc, &widget->style->base[GTK_STATE_NORMAL]);
 		gdk_draw_pixmap(html->html_area, gc, hb->pm, 0, 0, hb->x,
 						hb->y - html->yoffset - (hb->height) + 4, -1, -1);