]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Word wrap the info textview. Also do not show the scrollbars if not necessary.
authorNathan Samson <nathansamson@gmail.com>
Sun, 4 Sep 2011 13:08:01 +0000 (15:08 +0200)
committerNathan Samson <nathansamson@gmail.com>
Sun, 4 Sep 2011 13:17:21 +0000 (15:17 +0200)
Signed-off-by: Nathan Samson <nathansamson@gmail.com>
info.c

diff --git a/info.c b/info.c
index 99bf3f04118d39cb36c8c948d8b5616d4aa856ce..9abbbec400e58efff5b11cdc9044e933e68f04f9 100644 (file)
--- 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));