Revision: 7301
http://mahogany.svn.sourceforge.net/mahogany/?rev=7301&view=rev
Author: vadz
Date: 2007-07-27 16:26:08 -0700 (Fri, 27 Jul 2007)
Log Message:
-----------
Unicode build run-time fixes (don't cast char* to wxChar*, use
wxString::From8BitData instead of wxConvertMB2WX)
Modified Paths:
--------------
trunk/M/src/mail/MailFolderCC.cpp
trunk/M/src/mail/MimePartCCBase.cpp
Modified: trunk/M/src/mail/MailFolderCC.cpp
===================================================================
--- trunk/M/src/mail/MailFolderCC.cpp 2007-07-27 20:54:59 UTC (rev 7300)
+++ trunk/M/src/mail/MailFolderCC.cpp 2007-07-27 23:26:08 UTC (rev 7301)
@@ -2156,9 +2156,9 @@
{
// get INBOX path name
MCclientLocker lock;
- file = (wxChar *) mail_parameters (NIL,GET_SYSINBOX,NULL);
+ file = (char *) mail_parameters (NIL,GET_SYSINBOX,NULL);
if(file.empty()) // another c-client stupidity
- file = (wxChar *) sysinbox();
+ file = (char *) sysinbox();
}
#endif // OS_UNIX
else
@@ -4982,7 +4982,7 @@
// first, init cclient
MailFolderCCInit();
- gs_NewsSpoolDir = (wxChar *)mail_parameters(NULL, GET_NEWSSPOOL, NULL);
+ gs_NewsSpoolDir = (char *)mail_parameters(NULL, GET_NEWSSPOOL, NULL);
if ( !gs_NewsSpoolDir )
{
gs_NewsSpoolDir = READ_APPCONFIG_TEXT(MP_NEWS_SPOOL_DIR);
Modified: trunk/M/src/mail/MimePartCCBase.cpp
===================================================================
--- trunk/M/src/mail/MimePartCCBase.cpp 2007-07-27 20:54:59 UTC (rev 7300)
+++ trunk/M/src/mail/MimePartCCBase.cpp 2007-07-27 23:26:08 UTC (rev 7301)
@@ -139,14 +139,14 @@
{
// cast is ok as we use the same values in MimeType as c-client
return MimeType(static_cast<MimeType::Primary>(m_body->type),
- wxConvertMB2WX(m_body->subtype));
+ wxString::FromAscii(m_body->subtype));
}
String MimePartCCBase::GetDescription() const
{
// FIXME: we lose the encoding info here - but we don't have any way to
// return it from here currently
- return MailFolder::DecodeHeader(wxConvertMB2WX(m_body->description));
+ return
MailFolder::DecodeHeader(wxString::From8BitData(m_body->description));
}
MimeXferEncoding MimePartCCBase::GetTransferEncoding() const
@@ -185,7 +185,7 @@
String MimePartCCBase::GetDisposition() const
{
- return wxConvertMB2WX(m_body->disposition.type);
+ return wxString::From8BitData(m_body->disposition.type);
}
/* static */
@@ -230,7 +230,7 @@
{
while ( par )
{
- list->push_back(new MimeParameter(wxConvertMB2WX(par->attribute),
wxConvertMB2WX(par->value)));
+ list->push_back(new MimeParameter(par->attribute, par->value));
par = par->next;
}
@@ -452,11 +452,6 @@
if ( !p )
return wxGetEmptyString();
-#if wxUSE_UNICODE
- #warning "We need the original encoding here, TODO"
- return wxConvertMB2WX(p);
-#else // ANSI
- return wxString(p, len);
-#endif // Unicode/ANSI
+ return wxString::From8BitData(p);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates