From 14547d8ca26fb91b145c6051e541863fb89b76b5 Mon Sep 17 00:00:00 2001 From: Nathan Samson Date: Sun, 4 Sep 2011 15:08:01 +0200 Subject: [PATCH] Word wrap the info textview. Also do not show the scrollbars if not necessary. Signed-off-by: Nathan Samson --- info.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/info.c b/info.c index 99bf3f0..9abbbec 100644 --- a/info.c +++ b/info.c @@ -167,10 +167,12 @@ static GtkTextBuffer *text_view(GtkWidget *box, const char *label, gboolean expa gtk_box_pack_start(GTK_BOX(box), frame, expand, expand, 0); GtkWidget* scrolled_window = gtk_scrolled_window_new (0, 0); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled_window), GTK_SHADOW_IN); gtk_widget_show(scrolled_window); view = gtk_text_view_new (); + gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(view), GTK_WRAP_WORD); gtk_container_add(GTK_CONTAINER(scrolled_window), view); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)); -- 2.45.2