From d639875e773bda1e903956e25b54b9fc7414a0ad Mon Sep 17 00:00:00 2001 From: hiro Date: Tue, 23 Aug 2005 08:09:45 +0000 Subject: modified fonts for mime parts. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@500 ee746299-78ed-0310-b773-934348b2243d --- src/textview.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/textview.c') diff --git a/src/textview.c b/src/textview.c index 34360fbd..43641078 100644 --- a/src/textview.c +++ b/src/textview.c @@ -311,7 +311,7 @@ static void textview_create_tags(TextView *textview) buffer = gtk_text_view_get_buffer(text); gtk_text_buffer_create_tag(buffer, "header", - "pixels-above-lines", 0, + "pixels-above-lines", 1, "pixels-above-lines-set", TRUE, "pixels-below-lines", 0, "pixels-below-lines-set", TRUE, @@ -321,6 +321,14 @@ static void textview_create_tags(TextView *textview) "weight", PANGO_WEIGHT_BOLD, NULL); + gtk_text_buffer_create_tag(buffer, "mimepart", + "pixels-above-lines", 1, + "pixels-above-lines-set", TRUE, + "pixels-below-lines", 1, + "pixels-below-lines-set", TRUE, + "font-desc", font_desc, + NULL); + textview->quote0_tag = gtk_text_buffer_create_tag(buffer, "quote0", "foreground-gdk", "e_colors[0], @@ -647,7 +655,8 @@ static void textview_add_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp) #endif if (mimeinfo->mime_type != MIME_TEXT && mimeinfo->mime_type != MIME_TEXT_HTML) { - gtk_text_buffer_insert(buffer, &iter, buf, -1); + gtk_text_buffer_insert_with_tags_by_name + (buffer, &iter, buf, -1, "mimepart", NULL); if (mimeinfo->mime_type == MIME_IMAGE && prefs_common.inline_image) { GdkPixbuf *pixbuf; @@ -704,7 +713,8 @@ static void textview_add_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp) if (!mimeinfo->main && mimeinfo->parent && mimeinfo->parent->children != mimeinfo) - gtk_text_buffer_insert(buffer, &iter, buf, -1); + gtk_text_buffer_insert_with_tags_by_name + (buffer, &iter, buf, -1, "mimepart", NULL); else gtk_text_buffer_insert(buffer, &iter, "\n", 1); textview_write_body(textview, mimeinfo, fp, charset); -- cgit v1.2.3