# HG changeset patch # User Ka-Hing Cheung # Date 1191915446 0 # Node ID 9da2ac85ce813bd690eb63a663f6681acda801f6 # Parent 83b662c458de47061d104c0c86b28d33661acc1b compute the new size by adding the difference to the actual allocated size instead of requested size, to work around the fact that after the user manually resizes the gtkpaned it ignores the requested size, leading to a perpetually growing window (because the window thinks it needs to grow to accomodate the lower_hbox, except the gtkpaned doesn't allow it to grow, so the top gtkimhtml is grown instead) also included some commented out code to make auto resize always happen even after the user manually resizes, not sure if we should enable that. diff -r 83b662c458de -r 9da2ac85ce81 pidgin/gtkconv.c --- a/pidgin/gtkconv.c Tue Oct 09 03:38:47 2007 +0000 +++ b/pidgin/gtkconv.c Tue Oct 09 07:37:26 2007 +0000 @@ -4363,7 +4363,6 @@ gtk_menu_shell_insert(GTK_MENU_SHELL(menu), menuitem, 1); } - static void resize_imhtml_cb(PidginConversation *gtkconv) { GtkTextBuffer *buffer; @@ -4404,7 +4403,14 @@ if (diff > 0) { gtk_widget_size_request(gtkconv->lower_hbox, &sr); gtkconv->entry_growing = TRUE; - gtk_widget_set_size_request(gtkconv->lower_hbox, -1, diff + sr.height); + + /* uncomment this to auto resize even after the user manually + resizes + gtk_paned_set_position(GTK_PANED(gtkconv->lower_hbox->parent->parent), + -1); + */ + gtk_widget_set_size_request(gtkconv->lower_hbox, -1, + diff + gtkconv->lower_hbox->allocation.height); } }