Mercurial > pidgin
changeset 20842:9da2ac85ce81
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.
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Tue, 09 Oct 2007 07:37:26 +0000 |
parents | 83b662c458de |
children | a2b2fc59b571 |
files | pidgin/gtkconv.c |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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); } }