2007-11-08 [paul] 3.0.2cvs127
authorPaul Mangan <paul@claws-mail.org>
Thu, 8 Nov 2007 08:06:35 +0000 (08:06 +0000)
committerPaul Mangan <paul@claws-mail.org>
Thu, 8 Nov 2007 08:06:35 +0000 (08:06 +0000)
* src/textview.c
MAEMO: fix failure of loading images inline
MAEMO: fix bug 1349, 'Emails still skip to end
when opened (in certain circumstances)...'

ChangeLog
PATCHSETS
configure.ac
src/textview.c

index d41aee1..07f211e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-11-08 [paul]      3.0.2cvs127
+
+       * src/textview.c
+               MAEMO: fix failure of loading images inline
+               MAEMO: fix bug 1349, 'Emails still skip to end
+               when opened (in certain circumstances)...'
+
 2007-11-07 [colin]     3.0.2cvs126
 
        * src/toolbar.c
index e1f95d1..7722992 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.83.2.121 -r 1.83.2.122 src/mimeview.c;  cvs diff -u -r 1.204.2.150 -r 1.204.2.151 src/prefs_common.c;  cvs diff -u -r 1.103.2.96 -r 1.103.2.97 src/prefs_common.h;  cvs diff -u -r 1.1.2.43 -r 1.1.2.44 manual/advanced.xml;  ) > 3.0.2cvs124.patchset
 ( cvs diff -u -r 1.43.2.92 -r 1.43.2.93 src/toolbar.c;  ) > 3.0.2cvs125.patchset
 ( cvs diff -u -r 1.43.2.93 -r 1.43.2.94 src/toolbar.c;  ) > 3.0.2cvs126.patchset
+( cvs diff -u -r 1.96.2.191 -r 1.96.2.192 src/textview.c;  ) > 3.0.2cvs127.patchset
index 32cfdd0..6f22f0e 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=126
+EXTRA_VERSION=127
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 5f3243e..2d0c247 100644 (file)
@@ -656,6 +656,8 @@ static void textview_add_part(TextView *textview, MimeInfo *mimeinfo)
                if (mimeinfo->type == MIMETYPE_IMAGE  &&
                    prefs_common.inline_img ) {
                        GdkPixbuf *pixbuf;
+                       gint avail_width;
+                       gint avail_height;
                        GError *error = NULL;
                        gchar *filename;
                        ClickableText *uri;
@@ -677,11 +679,12 @@ static void textview_add_part(TextView *textview, MimeInfo *mimeinfo)
                        } else {
                                gint w, h;
                                gdk_pixbuf_get_file_info(filename, &w, &h);
-                               if (textview->scrolledwin->allocation.width - 100 > 0 &&
-                                   w > textview->scrolledwin->allocation.width - 100)
+                               avail_width = textview->scrolledwin->allocation.width;
+                               avail_height = textview->scrolledwin->allocation.height;
+                               if (avail_width - 100 > 0 &&
+                                   (w > avail_width || h > avail_height))
                                        pixbuf = gdk_pixbuf_new_from_file_at_scale(filename, 
-                                               textview->scrolledwin->allocation.width - 100, 
-                                               -1, TRUE, &error);
+                                               avail_width, avail_height, TRUE, &error);
                                else
                                        pixbuf = gdk_pixbuf_new_from_file(filename, &error);
                        }
@@ -741,7 +744,9 @@ static void recursive_add_parts(TextView *textview, GNode *node)
         mimeinfo = (MimeInfo *) node->data;
         
         textview_add_part(textview, mimeinfo);
-        
+#ifdef MAEMO
+       textview_set_position(textview, 0);
+#endif        
         if ((mimeinfo->type != MIMETYPE_MULTIPART) &&
             (mimeinfo->type != MIMETYPE_MESSAGE)) {
                END_TIMING();