Update of /cvsroot/mahogany/M/src/classes
In directory usw-pr-cvs1:/tmp/cvs-serv482/src/classes
Modified Files:
MessageView.cpp
Log Message:
show values of duplicated headers in different lines
Index: MessageView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/MessageView.cpp,v
retrieving revision 1.98
retrieving revision 1.99
diff -b -u -2 -r1.98 -r1.99
--- MessageView.cpp 13 Sep 2002 01:27:47 -0000 1.98
+++ MessageView.cpp 7 Nov 2002 19:49:37 -0000 1.99
@@ -74,4 +74,5 @@
#include <wx/mstream.h>
#include <wx/fontutil.h>
+#include <wx/tokenzr.h>
#include <ctype.h> // for isspace
@@ -1173,12 +1174,26 @@
// show the header and mark the URLs in it
- String name = headerNames[n];
+ const String& name = headerNames[n];
+
+ // there can be more than one line in each header in which case we show
+ // each line of the value on a separate line -- although this is wrong
+ // because there could be a single header with a multiline value as well,
+ // this is the best we can do considering that GetHeaderLine()
+ // concatenates the values of all headers with the same name anyhow
+ wxArrayString values = wxStringTokenize(value, _T("\n"));
+
+ const size_t linesCount = values.GetCount();
+ for ( size_t line = 0; line < linesCount; ++line )
+ {
m_viewer->ShowHeaderName(name);
+ String value = values[line];
+
// don't highlight the message IDs which looks just like the URLs but,
- // in fact, are not ones (the test catches Message-Id and Content-Id
- // headers)
+ // in fact, are not ones (the test is for Message-Id and Content-Id
+ // headers only right now but we use a wildcard in case there are some
+ // other similar ones)
bool highlightURLs = m_ProfileValues.highlightURLs &&
- !name.MakeUpper().Matches(_T("*-ID"));
+ !name.Upper().Matches(_T("*-ID"));
do
{
@@ -1245,4 +1260,5 @@
}
while ( !value.empty() );
+ }
m_viewer->EndHeader();
-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates