Update of /cvsroot/mahogany/M/src/classes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17782/src/classes

Modified Files:
        MessageView.cpp 
Log Message:
fixed images display in the richtext viewer which got broken by viewer 
autodetection changes

Index: MessageView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/MessageView.cpp,v
retrieving revision 1.170
retrieving revision 1.171
diff -b -u -2 -r1.170 -r1.171
--- MessageView.cpp     20 Jan 2006 02:01:47 -0000      1.170
+++ MessageView.cpp     8 Apr 2006 01:40:32 -0000       1.171
@@ -1971,7 +1971,13 @@
    const bool isAttachment = mimepart->IsAttachment();
 
-   // first check for viewer specific formats, next for text, then for
-   // images and finally show all the rest as generic attachment
-   if ( !isAttachment && CanViewerProcessPart(mimepart) )
+   // check for images before checking for more general viewer-specific part
+   // support as CanViewerProcessPart() returns for images if the viewer
+   // supports their inline display, but images should be inserted with
+   // ShowImage() and not InsertRawContents()
+   if ( primaryType == MimeType::IMAGE )
+   {
+      ShowImage(mimepart);
+   }
+   else if ( !isAttachment && CanViewerProcessPart(mimepart) )
    {
       // as we're going to need its contents, we'll have to download it: check
@@ -2003,8 +2009,4 @@
       ShowTextPart(mimepart);
    }
-   else if ( primaryType == MimeType::IMAGE )
-   {
-      ShowImage(mimepart);
-   }
    else // attachment
    {



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to