# HG changeset patch # User Sadrul Habib Chowdhury # Date 1209747649 0 # Node ID 9cbb7c2aba23c77f108b24fdfd17eb5609aae815 # Parent 862382aa6086a0732c4218ecb2d03ad6ad76c98d This should fix the issue where resizing the entry box resizes the window. For real this time! diff -r 862382aa6086 -r 9cbb7c2aba23 pidgin/gtkconv.c --- a/pidgin/gtkconv.c Fri May 02 16:55:59 2008 +0000 +++ b/pidgin/gtkconv.c Fri May 02 17:00:49 2008 +0000 @@ -4458,7 +4458,9 @@ GdkRectangle oneline; int height, diff; int pad_top, pad_inside, pad_bottom; - int max_height = (gtkconv->imhtml->allocation.height + gtkconv->entry->allocation.height) / 2; + int total_height = (gtkconv->imhtml->allocation.height + gtkconv->entry->allocation.height); + int max_height = total_height / 2; + int min_height; pad_top = gtk_text_view_get_pixels_above_lines(GTK_TEXT_VIEW(gtkconv->entry)); pad_bottom = gtk_text_view_get_pixels_below_lines(GTK_TEXT_VIEW(gtkconv->entry)); @@ -4482,12 +4484,11 @@ /* Make sure there's enough room for at least two lines. Allocate enough space to * prevent scrolling when the second line is a continuation of the first line, or * is the beginning of a new paragraph. */ - height = MAX(height, 2 * (oneline.height + MAX(pad_inside, pad_top + pad_bottom))); - - height = MIN(height, max_height); + min_height = 2 * (oneline.height + MAX(pad_inside, pad_top + pad_bottom)); + height = CLAMP(height, min_height, max_height); diff = height - gtkconv->entry->allocation.height; - if (diff == 0 || (diff < 0 && -diff < oneline.height / 2)) + if (ABS(diff) < oneline.height / 2) return FALSE; gtk_widget_set_size_request(gtkconv->lower_hbox, -1, @@ -4764,6 +4765,7 @@ /* Setup the gtkimhtml widget */ frame = pidgin_create_imhtml(FALSE, >kconv->imhtml, NULL, &imhtml_sw); + gtk_widget_set_size_request(gtkconv->imhtml, -1, 0); if (chat) { GtkWidget *hpaned;