Mercurial > pidgin
diff src/gtkconv.c @ 13280:3de53fe8345f
[gaim-migrate @ 15646]
Always show a vertical scrollbar on conversations imhtmls. This will solve the shrinking conversation window bug. I chose this approach instead of saving the size of the window (as I had previous talked about), as this prevents the contents of the scrollback from rewrapping when the scrollbars appear or disappear. It also just seems to feel like the right thing to do, but maybe that's me being lazy.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 14 Feb 2006 05:43:43 +0000 |
parents | f09c6e8df82c |
children | d75c24d3ffb0 |
line wrap: on
line diff
--- a/src/gtkconv.c Mon Feb 13 22:03:20 2006 +0000 +++ b/src/gtkconv.c Tue Feb 14 05:43:43 2006 +0000 @@ -3789,6 +3789,8 @@ GaimConnection *gc; GtkWidget *vpaned, *hpaned; GtkWidget *vbox, *hbox, *frame; + GtkWidget *imhtml_sw; + GtkPolicyType imhtml_sw_hscroll; GtkWidget *lbox, *bbox; GtkWidget *label; GtkWidget *list; @@ -3844,11 +3846,15 @@ gtk_widget_show(hpaned); /* Setup gtkihmtml. */ - frame = gaim_gtk_create_imhtml(FALSE, >kconv->imhtml, NULL); + frame = gaim_gtk_create_imhtml(FALSE, >kconv->imhtml, NULL, &imhtml_sw); gtk_widget_set_name(gtkconv->imhtml, "gaim_gtkconv_imhtml"); gtk_imhtml_show_comments(GTK_IMHTML(gtkconv->imhtml), TRUE); gtk_paned_pack1(GTK_PANED(hpaned), frame, TRUE, TRUE); gtk_widget_show(frame); + gtk_scrolled_window_get_policy(GTK_SCROLLED_WINDOW(imhtml_sw), + &imhtml_sw_hscroll, NULL); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(imhtml_sw), + imhtml_sw_hscroll, GTK_POLICY_ALWAYS); gtk_widget_set_size_request(gtkconv->imhtml, gaim_prefs_get_int("/gaim/gtk/conversations/chat/default_width"), @@ -3993,7 +3999,7 @@ gtk_widget_show(vbox); /* Setup the toolbar, entry widget and all signals */ - frame = gaim_gtk_create_imhtml(TRUE, >kconv->entry, >kconv->toolbar); + frame = gaim_gtk_create_imhtml(TRUE, >kconv->entry, >kconv->toolbar, NULL); gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); gtk_widget_show(frame); @@ -4036,6 +4042,8 @@ { GaimConversation *conv = gtkconv->active_conv; GtkWidget *frame; + GtkWidget *imhtml_sw; + GtkPolicyType imhtml_sw_hscroll; GtkWidget *paned; GtkWidget *vbox; GtkWidget *vbox2; @@ -4051,11 +4059,15 @@ gtk_widget_show(vbox); /* Setup the gtkimhtml widget */ - frame = gaim_gtk_create_imhtml(FALSE, >kconv->imhtml, NULL); + frame = gaim_gtk_create_imhtml(FALSE, >kconv->imhtml, NULL, &imhtml_sw); gtk_widget_set_name(gtkconv->imhtml, "gaim_gtkconv_imhtml"); gtk_imhtml_show_comments(GTK_IMHTML(gtkconv->imhtml),TRUE); gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); gtk_widget_show(frame); + gtk_scrolled_window_get_policy(GTK_SCROLLED_WINDOW(imhtml_sw), + &imhtml_sw_hscroll, NULL); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(imhtml_sw), + imhtml_sw_hscroll, GTK_POLICY_ALWAYS); gtk_widget_set_size_request(gtkconv->imhtml, gaim_prefs_get_int("/gaim/gtk/conversations/im/default_width"), @@ -4084,7 +4096,7 @@ gtk_widget_show(vbox2); /* Setup the toolbar, entry widget and all signals */ - frame = gaim_gtk_create_imhtml(TRUE, >kconv->entry, >kconv->toolbar); + frame = gaim_gtk_create_imhtml(TRUE, >kconv->entry, >kconv->toolbar, NULL); gtk_box_pack_start(GTK_BOX(vbox2), frame, TRUE, TRUE, 0); gtk_widget_show(frame);