# HG changeset patch # User Sean Egan # Date 1185313007 0 # Node ID 462737382c6471f8c019603832dded75fcccfce1 # Parent ce3c8d30a200b198d60f2b2627fe3c31b849084d Better imhtml auto-growing. Fixes #214 diff -r ce3c8d30a200 -r 462737382c64 pidgin/gtkconv.c --- a/pidgin/gtkconv.c Tue Jul 24 18:54:07 2007 +0000 +++ b/pidgin/gtkconv.c Tue Jul 24 21:36:47 2007 +0000 @@ -239,7 +239,6 @@ if (!PIDGIN_IS_PIDGIN_CONVERSATION(conv)) return FALSE; - if (gtkconv->auto_resize) { return FALSE; } @@ -264,7 +263,6 @@ if (w == gtkconv->lower_hbox) purple_prefs_set_int(PIDGIN_PREFS_ROOT "/conversations/chat/entry_height", allocation->height); } - return FALSE; } @@ -4260,12 +4258,12 @@ height = (oneline.height + pad_top + pad_bottom) * lines; height += (oneline.height + pad_inside) * (wrapped_lines - lines); + gtkconv->auto_resize = TRUE; + g_idle_add(reset_auto_resize_cb, gtkconv); gtk_widget_size_request(gtkconv->lower_hbox, &sr); if (sr.height < height + PIDGIN_HIG_BOX_SPACE) { - gtkconv->auto_resize = TRUE; gtkconv->entry_growing = TRUE; - gtk_widget_set_size_request(gtkconv->entry, -1, height); - g_idle_add(reset_auto_resize_cb, gtkconv); + gtk_widget_set_size_request(gtkconv->lower_hbox, -1, height + PIDGIN_HIG_BOX_SPACE); } } @@ -4547,7 +4545,6 @@ default_formatize(gtkconv); g_signal_connect_after(G_OBJECT(gtkconv->entry), "format_function_clear", G_CALLBACK(clear_formatting_cb), gtkconv); - return paned; } @@ -6522,7 +6519,6 @@ gtk_widget_show(event); gtkconv->u.im->icon = gtk_image_new_from_pixbuf(scale); - gtkconv->auto_resize = TRUE; gtk_container_add(GTK_CONTAINER(event), gtkconv->u.im->icon); gtk_widget_show(gtkconv->u.im->icon);