Mercurial > pidgin.yaz
comparison pidgin/gtkconv.c @ 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 | 680e1319b464 488796f5ba33 b1fa7765ca4b |
comparison
equal
deleted
inserted
replaced
20839:83b662c458de | 20842:9da2ac85ce81 |
---|---|
4361 menuitem = gtk_separator_menu_item_new(); | 4361 menuitem = gtk_separator_menu_item_new(); |
4362 gtk_widget_show(menuitem); | 4362 gtk_widget_show(menuitem); |
4363 gtk_menu_shell_insert(GTK_MENU_SHELL(menu), menuitem, 1); | 4363 gtk_menu_shell_insert(GTK_MENU_SHELL(menu), menuitem, 1); |
4364 } | 4364 } |
4365 | 4365 |
4366 | |
4367 static void resize_imhtml_cb(PidginConversation *gtkconv) | 4366 static void resize_imhtml_cb(PidginConversation *gtkconv) |
4368 { | 4367 { |
4369 GtkTextBuffer *buffer; | 4368 GtkTextBuffer *buffer; |
4370 GtkTextIter iter; | 4369 GtkTextIter iter; |
4371 int wrapped_lines; | 4370 int wrapped_lines; |
4402 diff = height - gtkconv->entry->allocation.height; | 4401 diff = height - gtkconv->entry->allocation.height; |
4403 | 4402 |
4404 if (diff > 0) { | 4403 if (diff > 0) { |
4405 gtk_widget_size_request(gtkconv->lower_hbox, &sr); | 4404 gtk_widget_size_request(gtkconv->lower_hbox, &sr); |
4406 gtkconv->entry_growing = TRUE; | 4405 gtkconv->entry_growing = TRUE; |
4407 gtk_widget_set_size_request(gtkconv->lower_hbox, -1, diff + sr.height); | 4406 |
4407 /* uncomment this to auto resize even after the user manually | |
4408 resizes | |
4409 gtk_paned_set_position(GTK_PANED(gtkconv->lower_hbox->parent->parent), | |
4410 -1); | |
4411 */ | |
4412 gtk_widget_set_size_request(gtkconv->lower_hbox, -1, | |
4413 diff + gtkconv->lower_hbox->allocation.height); | |
4408 } | 4414 } |
4409 } | 4415 } |
4410 | 4416 |
4411 static void | 4417 static void |
4412 setup_chat_topic(PidginConversation *gtkconv, GtkWidget *vbox) | 4418 setup_chat_topic(PidginConversation *gtkconv, GtkWidget *vbox) |