-
- /* And let's just make sure that a complete line fits into the
- widget's width */
- context = gtk_widget_create_pango_context (act->textview);
- layout = pango_layout_new (context);
-
- pango_layout_set_text (layout, "M", 1);
-
- pango_layout_set_font_description (layout, font_desc);
-
- pango_layout_get_extents (layout, NULL, &rect);
-
- g_object_set (act->textview, "width-request",
- PANGO_PIXELS (rect.width) * DOC_LINE_LENGTH + 20, NULL);
-
- g_object_unref (G_OBJECT (layout));
- g_object_unref (G_OBJECT (context));
-
- pango_font_description_free (font_desc);