comparison pidgin/gtkconv.c @ 20839:83b662c458de

uses the entry's allocated height instead of requested height, works around LP#150428
author Ka-Hing Cheung <khc@hxbc.us>
date Tue, 09 Oct 2007 03:38:47 +0000
parents effa512ad24a
children 9da2ac85ce81
comparison
equal deleted inserted replaced
20838:effa512ad24a 20839:83b662c458de
4369 GtkTextBuffer *buffer; 4369 GtkTextBuffer *buffer;
4370 GtkTextIter iter; 4370 GtkTextIter iter;
4371 int wrapped_lines; 4371 int wrapped_lines;
4372 int lines; 4372 int lines;
4373 GdkRectangle oneline; 4373 GdkRectangle oneline;
4374 GtkRequisition sr, entry_sr; 4374 GtkRequisition sr;
4375 int height, diff; 4375 int height, diff;
4376 int pad_top, pad_inside, pad_bottom; 4376 int pad_top, pad_inside, pad_bottom;
4377 4377
4378 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->entry)); 4378 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->entry));
4379 4379
4397 height += (oneline.height + pad_inside) * (wrapped_lines - lines); 4397 height += (oneline.height + pad_inside) * (wrapped_lines - lines);
4398 4398
4399 gtkconv->auto_resize = TRUE; 4399 gtkconv->auto_resize = TRUE;
4400 g_idle_add(reset_auto_resize_cb, gtkconv); 4400 g_idle_add(reset_auto_resize_cb, gtkconv);
4401 4401
4402 gtk_widget_size_request(gtkconv->entry, &entry_sr); 4402 diff = height - gtkconv->entry->allocation.height;
4403 diff = height - entry_sr.height;
4404 4403
4405 if (diff > 0) { 4404 if (diff > 0) {
4406 gtk_widget_size_request(gtkconv->lower_hbox, &sr); 4405 gtk_widget_size_request(gtkconv->lower_hbox, &sr);
4407 gtkconv->entry_growing = TRUE; 4406 gtkconv->entry_growing = TRUE;
4408 gtk_widget_set_size_request(gtkconv->lower_hbox, -1, diff + sr.height); 4407 gtk_widget_set_size_request(gtkconv->lower_hbox, -1, diff + sr.height);