Update of /cvsroot/mahogany/M/src/modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25081/src/modules
Modified Files:
HtmlViewer.cpp
Log Message:
only include HTML contents in reply if we were constructed from HTML, not from plain
text
Index: HtmlViewer.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/modules/HtmlViewer.cpp,v
retrieving revision 1.67
retrieving revision 1.68
diff -b -u -2 -r1.67 -r1.68
--- HtmlViewer.cpp 17 Jul 2004 22:19:39 -0000 1.67
+++ HtmlViewer.cpp 18 Jul 2004 10:26:19 -0000 1.68
@@ -178,7 +178,4 @@
bool m_firstheader;
- // do we have a non default font?
- bool m_hasGlobalFont;
-
#if wxUSE_PRINTING_ARCHITECTURE
// the object which does all printing for us
@@ -186,4 +183,8 @@
#endif // wxUSE_PRINTING_ARCHITECTURE
+ // do we have text (false) or HTML (true) contents?
+ bool m_hasHtmlContents;
+
+
DECLARE_MESSAGE_VIEWER()
};
@@ -594,4 +595,6 @@
#endif // wxUSE_PRINTING_ARCHITECTURE
+ m_hasHtmlContents = false;
+
m_htmlText.reserve(4096);
}
@@ -1122,9 +1125,6 @@
}
-#ifdef USE_STRIP_TAGS
- // we also have to extract all the text we have so that it could be included
- // in the reply
- m_msgView->OnBodyText(StripHtmlTags(data));
-#endif
+ // set the flag for EndBody
+ m_hasHtmlContents = true;
}
@@ -1168,4 +1168,10 @@
#if wxCHECK_VERSION(2, 5, 2)
+ // if we display HTML text, we need to let the msg view know about the text
+ // we have so that it could be quoted later -- normally this is done by
+ // TransparentFilter which intercepts all InsertText() calls, but it can't
+ // do this for InsertRawContents()
+ if ( m_hasHtmlContents )
+ {
String text(m_window->ToText());
size_t posEndHeaders = text.find("\n\n");
@@ -1173,5 +1179,8 @@
text.erase(0, posEndHeaders + 2);
m_msgView->OnBodyText(text);
-#endif
+
+ m_hasHtmlContents = false;
+ }
+#endif // wx >= 2.5.2
}
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates