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

Modified Files:
        HtmlViewer.cpp 
Log Message:
don't use non breaking spaces for spaces inside message body in HTML viewer (closes 
895)

Index: HtmlViewer.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/modules/HtmlViewer.cpp,v
retrieving revision 1.70
retrieving revision 1.71
diff -b -u -2 -r1.70 -r1.71
--- HtmlViewer.cpp      23 Jul 2004 17:23:25 -0000      1.70
+++ HtmlViewer.cpp      18 Sep 2004 22:25:49 -0000      1.71
@@ -57,5 +57,8 @@
 
 // filter out special HTML characters from the text
-static wxString MakeHtmlSafe(const wxString& text);
+//
+// if dontWrap is true, spaces are replaced by non breaking spaces ( ),
+// otherwise they're left alone
+static wxString MakeHtmlSafe(const wxString& text, bool dontWrap = true);
 
 // escape all double quotes in a string by replacing them with HTML entity
@@ -732,5 +735,5 @@
 }
 
-static wxString MakeHtmlSafe(const wxString& text)
+static wxString MakeHtmlSafe(const wxString& text, bool dontWrap)
 {
    wxString textSafe;
@@ -771,6 +774,10 @@
 
          case ' ':
+            if ( dontWrap )
+            {
             textSafe += _T(" ");
             break;
+            }
+            //else: fall through
 
          default:
@@ -1139,5 +1146,5 @@
    FontStyleChanger styleChanger(style.GetFont(), m_htmlText);
 
-   m_htmlText += MakeHtmlSafe(text);
+   m_htmlText += MakeHtmlSafe(text, false /* allow wrapping */);
 }
 



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to