# HG changeset patch # User Sadrul Habib Chowdhury # Date 1165459688 0 # Node ID 4bf1777efb1f6e68f3cb59543e3ce7120d081fae # Parent 1f0db03dd165029a7332a2f94ce1e5fe94d7ac52 [gaim-migrate @ 17904] I was getting a scrollbar in the statusbox with only one line of message. This fixes that. committer: Tailor Script diff -r 1f0db03dd165 -r 4bf1777efb1f gtk/gtkstatusbox.c --- a/gtk/gtkstatusbox.c Wed Dec 06 23:05:51 2006 +0000 +++ b/gtk/gtkstatusbox.c Thu Dec 07 02:48:08 2006 +0000 @@ -1661,7 +1661,7 @@ /* If the gtkimhtml is visible, then add some additional padding */ gtk_widget_size_request(GTK_GAIM_STATUS_BOX(widget)->vbox, &box_req); if (box_req.height > 1) - requisition->height += box_req.height + border_width; + requisition->height += box_req.height + border_width * 2; requisition->width = 1; } @@ -1726,7 +1726,7 @@ box_alc.height = MAX(1, ((allocation->height - req.height) - (border_width*2))); box_alc.x += border_width; box_alc.y += req.height + border_width; - gtk_widget_size_allocate((GTK_GAIM_STATUS_BOX(widget))->vbox, &box_alc); + gtk_widget_size_allocate(status_box->vbox, &box_alc); parent_alc = *allocation; parent_alc.height = MAX(1,req.height - (border_width *2)); @@ -2201,6 +2201,7 @@ wrapped_lines = 1; gtk_text_buffer_get_start_iter(buffer, &iter); + gtk_text_view_get_iter_location(GTK_TEXT_VIEW(status_box->imhtml), &iter, &oneline); while (gtk_text_view_forward_display_line(GTK_TEXT_VIEW(status_box->imhtml), &iter)) wrapped_lines++; @@ -2210,9 +2211,6 @@ lines = MIN(lines, 4); wrapped_lines = MIN(wrapped_lines, 4); - gtk_text_buffer_get_start_iter(buffer, &iter); - gtk_text_view_get_iter_location(GTK_TEXT_VIEW(status_box->imhtml), &iter, &oneline); - pad_top = gtk_text_view_get_pixels_above_lines(GTK_TEXT_VIEW(status_box->imhtml)); pad_bottom = gtk_text_view_get_pixels_below_lines(GTK_TEXT_VIEW(status_box->imhtml)); pad_inside = gtk_text_view_get_pixels_inside_wrap(GTK_TEXT_VIEW(status_box->imhtml));