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 d41aee12c7001f9cdfd7b01d8158b36144296270..07f211ea1ca578ef6bb23506582fdabde63ee83d 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 e1f95d100fa9e8f92503e62557d1457530e73c96..7722992ee170a839627a7d61c3390e57c8cd6d2d 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 32cfdd04af58e515648820049d4557ae6023a589..6f22f0e2a729c9d1571e8d19cf0abb7fecc5d79c 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 5f3243ed28bdc884dca2bed51c9b8b20a9b81ea1..2d0c247405ea505016e30a9065a006fdede28e21 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();