summaryrefslogtreecommitdiff
path: root/src/text.c
diff options
context:
space:
mode:
authormuzuiget <muzuiget@gmail.com>2010-08-19 05:40:57 +0800
committerArx Cruz <arxcruz@src.gnome.org>2011-01-04 11:29:49 -0200
commite5467650a641694c82d85cc5d34a5ece28fd51f0 (patch)
treeb87a082b7d8d50a5013bed5c587c53752dd8494f /src/text.c
parentFix for bug 540560. (diff)
downloadzenity-e5467650a641694c82d85cc5d34a5ece28fd51f0.tar.gz
zenity-e5467650a641694c82d85cc5d34a5ece28fd51f0.tar.bz2
zenity-e5467650a641694c82d85cc5d34a5ece28fd51f0.zip
Add font and no wrap mode support in text dialog
Diffstat (limited to 'src/text.c')
-rw-r--r--src/text.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/text.c b/src/text.c
index eb5f989b..cd31c5f9 100644
--- a/src/text.c
+++ b/src/text.c
@@ -134,6 +134,14 @@ zenity_text (ZenityData *data, ZenityTextData *text_data)
gtk_text_view_set_buffer (GTK_TEXT_VIEW (text_view), text_buffer);
gtk_text_view_set_editable (GTK_TEXT_VIEW(text_view), text_data->editable);
+ if (text_data->no_wrap)
+ gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW(text_view), GTK_WRAP_NONE);
+
+ if (text_data->font) {
+ PangoFontDescription *fontDesc = pango_font_description_from_string (text_data->font);
+ gtk_widget_modify_font(GTK_TEXT_VIEW(text_view), fontDesc);
+ }
+
if (text_data->uri)
zenity_util_fill_file_buffer (text_buffer, text_data->uri);
else
bgstack15