aboutsummaryrefslogtreecommitdiff
path: root/src/textview.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-03-08 11:06:12 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-03-08 11:06:12 +0000
commita305abdfe054c5ef5e472d2d99723b4032308b1d (patch)
tree22f7d398e3c7718d84879e622df2c6e61d7eb34c /src/textview.c
parent0ff75d10977146767ccc42c2e2915f75886a68bf (diff)
also resize inline images.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@155 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/textview.c')
-rw-r--r--src/textview.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/textview.c b/src/textview.c
index 81142690..8720f62b 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -30,6 +30,7 @@
#include <gtk/gtkvbox.h>
#include <gtk/gtkscrolledwindow.h>
#include <gtk/gtksignal.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
@@ -37,6 +38,7 @@
#include "main.h"
#include "summaryview.h"
+#include "imageview.h"
#include "procheader.h"
#include "prefs_common.h"
#include "codeconv.h"
@@ -619,10 +621,19 @@ static void textview_add_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp)
return;
}
+ if (prefs_common.resize_image) {
+ GdkPixbuf *scaled;
+
+ scaled = imageview_get_resized_pixbuf
+ (pixbuf, textview->text, 8);
+ g_object_unref(pixbuf);
+ pixbuf = scaled;
+ }
+
gtk_text_buffer_insert_pixbuf(buffer, &iter, pixbuf);
gtk_text_buffer_insert(buffer, &iter, "\n", 1);
- g_object_unref(G_OBJECT(pixbuf));
+ g_object_unref(pixbuf);
}
} else {
if (!mimeinfo->main &&