Revision: 7280
http://svn.sourceforge.net/mahogany/?rev=7280&view=rev
Author: vadz
Date: 2007-06-05 17:11:31 -0700 (Tue, 05 Jun 2007)
Log Message:
-----------
compilation fixes for Unicode wx build (it compiles now (modulo some pending fixes to wx itself) but almost definitely doesn't work, do not use Unicode version yet)
Modified Paths:
--------------
trunk/M/include/MImport.h
trunk/M/include/MessageViewer.h
trunk/M/include/MimePart.h
trunk/M/include/QuotedText.h
trunk/M/include/gui/wxMApp.h
trunk/M/include/interface/MDialogs.i
trunk/M/src/adb/AdbManager.cpp
trunk/M/src/adb/ExportPalm.cpp
trunk/M/src/classes/CacheFile.cpp
trunk/M/src/classes/MApplication.cpp
trunk/M/src/classes/MessageView.cpp
trunk/M/src/classes/Profile.cpp
trunk/M/src/classes/QuotedText.cpp
trunk/M/src/gui/wxMApp.cpp
trunk/M/src/gui/wxOptionsDlg.cpp
trunk/M/src/mail/AddressCC.cpp
trunk/M/src/mail/MailFolder.cpp
trunk/M/src/mail/MailFolderCC.cpp
trunk/M/src/mail/MailMH.cpp
trunk/M/src/mail/MessageCC.cpp
trunk/M/src/modules/Filters.cpp
trunk/M/src/modules/Mdummy.cpp
trunk/M/src/modules/TextViewer.cpp
trunk/M/src/modules/viewflt/QuoteURL.cpp
trunk/M/src/util/matchurl.cpp
trunk/M/src/util/strutil.cpp
Modified: trunk/M/include/MImport.h
===================================================================
--- trunk/M/include/MImport.h 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/include/MImport.h 2007-06-06 00:11:31 UTC (rev 7280)
@@ -103,7 +103,7 @@
// this macro must be used inside the declaration of the importer class
#define DECLARE_M_IMPORTER() \
- virtual const wxChar *GetProgName() const; \
+ virtual const wxChar *GetProgName() const; \
MMODULE_DEFINE(); \
DEFAULT_ENTRY_FUNC \
@@ -111,13 +111,14 @@
// lines of the form MMODULE_PROP(name, value) between them to add other
// properties such as description or whatever
#define MIMPORTER_BEGIN_IMPLEMENT(cname, progname, desc) \
- MMODULE_BEGIN_IMPLEMENT(cname, #cname, M_IMPORTER_INTERFACE, "", "1.00") \
+ MMODULE_BEGIN_IMPLEMENT(cname, _T(#cname), M_IMPORTER_INTERFACE, \
+ _T(""), _T("1.00")) \
MMODULE_PROP(M_IMPORTER_PROG_NAME, progname) \
- MMODULE_PROP(MMODULE_DESCRIPTION_PROP, _(desc))
+ MMODULE_PROP(MMODULE_DESCRIPTION_PROP, desc)
#define MIMPORTER_END_IMPLEMENT(cname) \
MMODULE_END_IMPLEMENT(cname) \
- const wxChar *cname::GetProgName() const \
+ const wxChar *cname::GetProgName() const \
{ \
return GetMModuleProperty(ms_properties, M_IMPORTER_PROG_NAME); \
} \
Modified: trunk/M/include/MessageViewer.h
===================================================================
--- trunk/M/include/MessageViewer.h 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/include/MessageViewer.h 2007-06-06 00:11:31 UTC (rev 7280)
@@ -260,9 +260,9 @@
MMODULE_DEFINE(); \
DEFAULT_ENTRY_FUNC; \
}; \
- MMODULE_BEGIN_IMPLEMENT(cname##Factory, #cname, \
- MESSAGE_VIEWER_INTERFACE, desc, "1.00") \
- MMODULE_PROP("author", cpyright) \
+ MMODULE_BEGIN_IMPLEMENT(cname##Factory, _T(#cname), \
+ MESSAGE_VIEWER_INTERFACE, desc, _T("1.00")) \
+ MMODULE_PROP(MMODULE_AUTHOR_PROP, cpyright) \
MMODULE_END_IMPLEMENT(cname##Factory) \
MModule *cname##Factory::Init(int /* version_major */, \
int /* version_minor */, \
Modified: trunk/M/include/MimePart.h
===================================================================
--- trunk/M/include/MimePart.h 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/include/MimePart.h 2007-06-06 00:11:31 UTC (rev 7280)
@@ -186,6 +186,18 @@
/// get the raw (un-decoded) contents of this part
virtual const void *GetRawContent(unsigned long *len = NULL) const = 0;
+ /// get the raw (un-decoded) contents of this part as a string
+ String GetRawContentAsString() const
+ {
+ unsigned long len = 0;
+ const char *c = static_cast<const char *>(GetRawContent(&len));
+
+ // always interpret the string as ISO8859-1 to ensure that the conversion
+ // doesn't fail (as it could do with e.g. UTF-8): we don't really care
+ // about the encoding anyhow, we just need raw bytes here
+ return wxString::From8BitData(c, len);
+ }
+
/**
get the decoded contents of this part
Modified: trunk/M/include/QuotedText.h
===================================================================
--- trunk/M/include/QuotedText.h 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/include/QuotedText.h 2007-06-06 00:11:31 UTC (rev 7280)
@@ -51,7 +51,7 @@
// pointer to previous line we examined
- const char *linePrev;
+ const wxChar *linePrev;
// set to > 0 if the next line is wrapped tail of this one
int levelWrapped;
@@ -74,7 +74,7 @@
@return number of quoting levels (0 for unquoted text)
*/
int
-CountQuoteLevel(const char *string,
+CountQuoteLevel(const wxChar *string,
int max_white,
int max_alpha,
QuoteData& quoteData);
Modified: trunk/M/include/gui/wxMApp.h
===================================================================
--- trunk/M/include/gui/wxMApp.h 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/include/gui/wxMApp.h 2007-06-06 00:11:31 UTC (rev 7280)
@@ -68,7 +68,7 @@
/// implement base class virtuals
virtual wxMFrame *CreateTopLevelFrame();
virtual void OnFatalException() { OnAbnormalTermination(); }
- virtual void OnAbnormalTermination(const char *msg = NULL);
+ virtual void OnAbnormalTermination(const wxChar *msg = NULL);
virtual bool StartTimer(Timer timer);
virtual bool StopTimer(Timer timer);
Modified: trunk/M/include/interface/MDialogs.i
===================================================================
--- trunk/M/include/interface/MDialogs.i 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/include/interface/MDialogs.i 2007-06-06 00:11:31 UTC (rev 7280)
@@ -20,7 +20,7 @@
%{
bool Message(const char *message)
{
- return MDialog_Message(message, NULL);
+ return MDialog_Message(wxString(message), NULL);
}
void Status(const char *message)
Modified: trunk/M/src/adb/AdbManager.cpp
===================================================================
--- trunk/M/src/adb/AdbManager.cpp 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/src/adb/AdbManager.cpp 2007-06-06 00:11:31 UTC (rev 7280)
@@ -427,8 +427,8 @@
posParamEnd == String::npos
? posParamEnd
: posParamEnd - posEq - 1);
- ;
- if ( wxStricmp(param, "subject") == 0 )
+
+ if ( wxStricmp(param, _T("subject")) == 0 )
{
*subject = value;
}
Modified: trunk/M/src/adb/ExportPalm.cpp
===================================================================
--- trunk/M/src/adb/ExportPalm.cpp 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/src/adb/ExportPalm.cpp 2007-06-06 00:11:31 UTC (rev 7280)
@@ -133,7 +133,7 @@
IMPLEMENT_ADB_EXPORTER(AdbPalmExporter,
gettext_noop("PalmOS format address book exporter"),
gettext_noop("PalmOS addressbook"),
- _T("Karsten Ball\xFCder <[email protected]>"));
+ _T("Karsten Ballueder <[email protected]>"));
// ----------------------------------------------------------------------------
Modified: trunk/M/src/classes/CacheFile.cpp
===================================================================
--- trunk/M/src/classes/CacheFile.cpp 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/src/classes/CacheFile.cpp 2007-06-06 00:11:31 UTC (rev 7280)
@@ -75,7 +75,7 @@
int CacheFile::CheckFormatVersion(const String& header, int *version) const
{
int verMaj, verMin;
- if ( wxSscanf(header, GetFileHeader(), &verMaj, &verMin) == 2 )
+ if ( wxSscanf(header.mb_str(), GetFileHeader(), &verMaj, &verMin) == 2 )
{
int verMajCurrent, verMinCurrent;
SplitVersion(GetFormatVersion(), verMajCurrent, verMinCurrent);
Modified: trunk/M/src/classes/MApplication.cpp
===================================================================
--- trunk/M/src/classes/MApplication.cpp 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/src/classes/MApplication.cpp 2007-06-06 00:11:31 UTC (rev 7280)
@@ -307,26 +307,24 @@
if ( !READ_APPCONFIG(MP_DONTOPENSTARTUP) )
{
- String foldersToReopen = READ_APPCONFIG(MP_OPENFOLDERS);
- wxChar *folders = strutil_strdup(foldersToReopen);
- kbStringList openFoldersList;
- strutil_tokenise(folders, _T(";"), openFoldersList);
- delete [] folders;
+ const wxArrayString foldersToReopen(
+ strutil_restore_array(READ_APPCONFIG(MP_OPENFOLDERS), ';'));
bool ok = true;
- kbStringList::iterator i;
- for(i = openFoldersList.begin(); i != openFoldersList.end(); i++)
+ for ( wxArrayString::const_iterator i = foldersToReopen.begin();
+ i != foldersToReopen.end();
+ ++i )
{
- String *name = *i;
+ const String& name = *i;
- if ( name->empty() )
+ if ( name.empty() )
{
FAIL_MSG( _T("empty folder name in the list of folders to open?") );
continue;
}
- MFolder_obj folder(*name);
+ MFolder_obj folder(name);
if ( folder.IsOk() )
{
if ( !OpenFolderViewFrame(folder, m_topLevelFrame) )
@@ -338,7 +336,7 @@
else
{
wxLogWarning(_("Failed to reopen folder '%s', it doesn't seem "
- "to exist any more."), name->c_str());
+ "to exist any more."), name.c_str());
ok = false;
}
@@ -567,15 +565,15 @@
// show the error messages generated before first
wxLog::FlushActive();
- static const wxChar *msg =
- _T("Detected a possible problem with your Python installation.\n"
- "A properly installed Python system is required for using\n"
- "M's scripting capabilities. Some minor functionality might\n"
- "be missing without it, however the core functions will be\n"
- "unaffected.\n"
- "Would you like to disable Python support for now?\n"
- "(You can re-enable it later from the options dialog)");
- if ( MDialog_YesNoDialog(_(msg)) )
+ if ( MDialog_YesNoDialog(
+ _("Detected a possible problem with your Python installation.\n"
+ "A properly installed Python system is required for using\n"
+ "M's scripting capabilities. Some minor functionality might\n"
+ "be missing without it, however the core functions will be\n"
+ "unaffected.\n"
+ "Would you like to disable Python support for now?\n"
+ "(You can re-enable it later from the options dialog)")
+ ) )
{
// disable it
m_profile->writeEntry(MP_USEPYTHON, FALSE);
Modified: trunk/M/src/classes/MessageView.cpp
===================================================================
--- trunk/M/src/classes/MessageView.cpp 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/src/classes/MessageView.cpp 2007-06-06 00:11:31 UTC (rev 7280)
@@ -2172,16 +2172,6 @@
return false;
}
- // the signature is applied to both the headers and the body of the
- // message and it is done after encoding the latter so we need to get
- // it in the raw form
- String signedText = signedPart->GetHeaders();
-
- unsigned long signedTextLength = 0;
- const char *c = static_cast<const char *>(
- signedPart->GetRawContent(&signedTextLength));
- signedText += String(wxConvertMB2WX(c), signedTextLength);
-
MCryptoEngineFactory * const factory
= (MCryptoEngineFactory *)MModule::LoadModule(_T("PGPEngine"));
CHECK( factory, false, _T("failed to create PGPEngineFactory") );
@@ -2189,6 +2179,12 @@
MCryptoEngine *pgpEngine = factory->Get();
MCryptoEngineOutputLog *log = new MCryptoEngineOutputLog(GetWindow());
+ // the signature is applied to both the headers and the body of the
+ // message and it is done after encoding the latter so we need to get
+ // it in the raw form
+ String signedText = signedPart->GetHeaders() +
+ signedPart->GetRawContentAsString();
+
MCryptoEngine::Status status = pgpEngine->VerifyDetachedSignature
(
signedText,
@@ -2250,9 +2246,7 @@
return false;
}
- unsigned long encryptedPartLength = 0;
- const char* c = (const char *)encryptedPart->GetRawContent(&encryptedPartLength);
- String encryptedData(wxConvertMB2WX(c), encryptedPartLength);
+ String encryptedData = encryptedPart->GetRawContentAsString();
MCryptoEngineFactory * const factory
= (MCryptoEngineFactory *)MModule::LoadModule(_T("PGPEngine"));
@@ -3041,23 +3035,20 @@
(wxMimeTypesManager::IsOfType(mimetype, _T("IMAGE/TIFF"))
|| wxMimeTypesManager::IsOfType(mimetype, _T("APPLICATION/OCTET-STREAM"))))
{
- kbStringList faxdomains;
- String faxListing = READ_CONFIG(profile, MP_INCFAX_DOMAINS);
- wxChar *faxlisting = strutil_strdup(faxListing);
- strutil_tokenise(faxlisting, _T(":;,"), faxdomains);
- delete [] faxlisting;
+ const wxArrayString faxdomains(
+ strutil_restore_array(READ_CONFIG(profile, MP_INCFAX_DOMAINS)));
bool isfax = false;
- wxString domain;
wxString fromline = m_mailMessage->From();
strutil_tolower(fromline);
- for(kbStringList::iterator i = faxdomains.begin();
- i != faxdomains.end(); i++)
+ for( wxArrayString::const_iterator i = faxdomains.begin();
+ i != faxdomains.end();
+ ++i )
{
- domain = **i;
+ wxString domain = *i;
strutil_tolower(domain);
- if(fromline.Find(domain) != -1)
+ if ( fromline.Find(domain) != -1 )
isfax = true;
}
Modified: trunk/M/src/classes/Profile.cpp
===================================================================
--- trunk/M/src/classes/Profile.cpp 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/src/classes/Profile.cpp 2007-06-06 00:11:31 UTC (rev 7280)
@@ -69,7 +69,7 @@
/** Name for the subgroup level used for suspended profiles. Must
never appear as part of a profile path name. */
-extern const char SUSPEND_PATH[] = _T("__suspended__");
+extern const char SUSPEND_PATH[] = "__suspended__";
/// flags for readEntry
enum
Modified: trunk/M/src/classes/QuotedText.cpp
===================================================================
--- trunk/M/src/classes/QuotedText.cpp 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/src/classes/QuotedText.cpp 2007-06-06 00:11:31 UTC (rev 7280)
@@ -35,20 +35,11 @@
extern const MOption MP_MVIEW_QUOTED_MAXWHITESPACE;
extern const MOption MP_MVIEW_QUOTED_MAXALPHA;
-// ----------------------------------------------------------------------------
-// private functions prototypes
-// ----------------------------------------------------------------------------
-
-/**
- Check if there is only whitespace until the end of line.
- */
-static bool IsBlankLine(const char *p);
-
// ============================================================================
// CountQuoteLevel() and helper functions implementation
// ============================================================================
-static bool IsBlankLine(const char *p)
+static bool IsBlankLine(const wxChar *p)
{
for ( ;; )
{
@@ -80,7 +71,7 @@
// advance the *pp pointer if it points to the same thing as c
static void
-UpdateLineStatus(const char *c, const char **pp, LineResult *pSameAs)
+UpdateLineStatus(const wxChar *c, const wxChar **pp, LineResult *pSameAs)
{
if ( *pSameAs == Line_Unknown || *pSameAs == Line_Same )
{
@@ -98,13 +89,13 @@
}
int
-CountQuoteLevel(const char *string,
+CountQuoteLevel(const wxChar *string,
int max_white,
int max_alpha,
QuoteData& quoteData)
{
// update the previous line pointer for the next call
- const char *prev = quoteData.linePrev;
+ const wxChar *prev = quoteData.linePrev;
quoteData.linePrev = string;
// check if this line had been already detected as a quoted tail of the
@@ -118,11 +109,11 @@
// find the beginning of the and next line
- const char *nextStart = strchr(string, '\n');
+ const wxChar *nextStart = wxStrchr(string, '\n');
// it's simpler to pretend that the next line is the same as this one
// instead of checking for it all the time below
- const char *next = nextStart ? nextStart + 1 /* skip '\n' */ : string;
+ const wxChar *next = nextStart ? nextStart + 1 /* skip '\n' */ : string;
if ( !prev )
{
@@ -134,8 +125,8 @@
// look at the beginning of this string and count (nested) quoting levels
LineResult sameAsNext = Line_Unknown,
sameAsPrev = Line_Unknown;
- const char *lastQuote = string;
- for ( const char *c = string; *c != 0 && *c != '\n'; c++, lastQuote = c )
+ const wxChar *lastQuote = string;
+ for ( const wxChar *c = string; *c != 0 && *c != '\n'; c++, lastQuote = c )
{
// skip leading white space
for ( int num_white = 0; *c == '\t' || *c == ' '; c++ )
@@ -240,11 +231,11 @@
if ( next - string > 50 )
{
// we also check "wrapped" line is short enough
- const char *nextnext = strchr(nextStart + 1 /* skip \n */, '\n');
+ const wxChar *nextnext = wxStrchr(nextStart + 1 /* skip \n */, '\n');
if ( !nextnext ||
(nextnext - next > 25) ||
(!IsBlankLine(nextnext + 1) &&
- strncmp(string, nextnext + 1, next - nextStart) != 0) )
+ wxStrncmp(string, nextnext + 1, next - nextStart) != 0) )
{
// the line after next doesn't start with the same prefix as
// this one so it's improbable that the next line was garbled
@@ -299,7 +290,7 @@
const int maxWhite = READ_CONFIG(profile, MP_MVIEW_QUOTED_MAXWHITESPACE);
const int maxAlpha = READ_CONFIG(profile, MP_MVIEW_QUOTED_MAXALPHA);
QuoteData qd;
- for ( const char *lineCur = text.c_str(); *lineCur; )
+ for ( const wxChar *lineCur = text.c_str(); *lineCur; )
{
// find the start of the next line
const wxChar *lineNext = wxStrchr(lineCur, _T('\n'));
Modified: trunk/M/src/gui/wxMApp.cpp
===================================================================
--- trunk/M/src/gui/wxMApp.cpp 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/src/gui/wxMApp.cpp 2007-06-06 00:11:31 UTC (rev 7280)
@@ -477,7 +477,7 @@
class MDebugReport : public wxDebugReportCompress
{
public:
- MDebugReport(const char *msg)
+ MDebugReport(const wxChar *msg)
{
AddAll(msg == NULL ? Context_Exception : Context_Current);
@@ -721,7 +721,7 @@
}
void
-wxMApp::OnAbnormalTermination(const char *msgOrig)
+wxMApp::OnAbnormalTermination(const wxChar *msgOrig)
{
static bool s_crashed = false;
Modified: trunk/M/src/gui/wxOptionsDlg.cpp
===================================================================
--- trunk/M/src/gui/wxOptionsDlg.cpp 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/src/gui/wxOptionsDlg.cpp 2007-06-06 00:11:31 UTC (rev 7280)
@@ -1851,6 +1851,8 @@
#define CONFIG_ENTRY(name) ConfigValueDefault(name##_NAME, name##_DEFVAL)
// worse: dummy entries for message fields
#define CONFIG_NONE() ConfigValueNone()
+// and another one: an entry for Python callback
+#define CONFIG_PYCALLBACK(name) ConfigValueDefault(_T(name), _T(""))
// if you modify this array, search for DONT_FORGET_TO_MODIFY and modify data
// there too
@@ -2059,11 +2061,11 @@
CONFIG_NONE(),
CONFIG_ENTRY(MP_PYTHONMODULE_TO_LOAD),
CONFIG_NONE(),
- ConfigValueDefault(MCB_FOLDEROPEN, ""),
- ConfigValueDefault(MCB_FOLDERUPDATE, ""),
- ConfigValueDefault(MCB_FOLDEREXPUNGE, ""),
- ConfigValueDefault(MCB_FOLDERSETMSGFLAG, ""),
- ConfigValueDefault(MCB_FOLDERCLEARMSGFLAG, ""),
+ CONFIG_PYCALLBACK(MCB_FOLDEROPEN),
+ CONFIG_PYCALLBACK(MCB_FOLDERUPDATE),
+ CONFIG_PYCALLBACK(MCB_FOLDEREXPUNGE),
+ CONFIG_PYCALLBACK(MCB_FOLDERSETMSGFLAG),
+ CONFIG_PYCALLBACK(MCB_FOLDERCLEARMSGFLAG),
#endif // USE_PYTHON
// message view
Modified: trunk/M/src/mail/AddressCC.cpp
===================================================================
--- trunk/M/src/mail/AddressCC.cpp 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/src/mail/AddressCC.cpp 2007-06-06 00:11:31 UTC (rev 7280)
@@ -256,8 +256,8 @@
size_t pos = email.find('@');
if ( pos != String::npos )
{
- adr->mailbox = cpystr(wxConvertWX2MB(email.substr(0, pos).c_str()));
- adr->host = cpystr(wxConvertWX2MB(email.c_str()) + pos + 1);
+ adr->mailbox = cpystr(email.substr(0, pos).c_str());
+ adr->host = cpystr(email.c_str() + pos + 1);
}
else // no '@'?
{
Modified: trunk/M/src/mail/MailFolder.cpp
===================================================================
--- trunk/M/src/mail/MailFolder.cpp 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/src/mail/MailFolder.cpp 2007-06-06 00:11:31 UTC (rev 7280)
@@ -1251,9 +1251,9 @@
String fromLine = _T("From ");
// find the from address
- static const wxChar *FROM_HEADER = _T("From: ");
- const wxChar *
- p = wxStrstr(static_cast<const char *>(content), FROM_HEADER);
+ static const char *FROM_HEADER = "From: ";
+ const char *
+ p = strstr(static_cast<const char *>(content), FROM_HEADER);
if ( !p )
{
// this shouldn't normally happen, but if it does just make it up
@@ -1264,8 +1264,8 @@
else // take everything until the end of line
{
// extract just the address in angle brackets
- p += wxStrlen(FROM_HEADER);
- const wxChar *q = wxStrchr(p, '<');
+ p += strlen(FROM_HEADER);
+ const char *q = strchr(p, '<');
if ( q )
p = q + 1;
Modified: trunk/M/src/mail/MailFolderCC.cpp
===================================================================
--- trunk/M/src/mail/MailFolderCC.cpp 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/src/mail/MailFolderCC.cpp 2007-06-06 00:11:31 UTC (rev 7280)
@@ -2674,7 +2674,7 @@
{
mf->DecRef();
- if ( wxConvertWX2MB(driverName) != CCLIENT_DRIVER_NAME )
+ if ( driverName != CCLIENT_DRIVER_NAME )
continue;
// the cast is valid because of the check above
Modified: trunk/M/src/mail/MailMH.cpp
===================================================================
--- trunk/M/src/mail/MailMH.cpp 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/src/mail/MailMH.cpp 2007-06-06 00:11:31 UTC (rev 7280)
@@ -214,7 +214,7 @@
#endif // Unix/!Unix
// const_cast is harmless
- mail_parameters(NULL, SET_MHPATH, (char *)pathMH.mb_str());
+ mail_parameters(NULL, SET_MHPATH, pathMH.char_str());
}
// force cclient to init the MH driver
@@ -305,7 +305,7 @@
if ( root != InitializeMH() )
{
// const_cast is harmless
- mail_parameters(NULL, SET_MHPATH, (char *)root.mb_str());
+ mail_parameters(NULL, SET_MHPATH, root.char_str());
}
// first create the root MH folder
Modified: trunk/M/src/mail/MessageCC.cpp
===================================================================
--- trunk/M/src/mail/MessageCC.cpp 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/src/mail/MessageCC.cpp 2007-06-06 00:11:31 UTC (rev 7280)
@@ -196,7 +196,7 @@
String date;
if ( m_Envelope )
- date = wxConvertMB2WX(m_Envelope->date);
+ date = m_Envelope->date;
else
FAIL_MSG( _T("should have envelop in Date()") );
@@ -305,7 +305,7 @@
const char *cptr = mail_fetchheader_full(m_folder->Stream(), m_uid,
NULL, &len, FT_UID);
m_folder->UnLock();
- str = String(wxConvertMB2WX(cptr), (size_t)len);
+ str = String::From8BitData(cptr, len);
}
else
{
@@ -699,7 +699,7 @@
unsigned long len = 0;
// NB: this pointer shouldn't be freed
- char *cptr = (*fetchFunc)(stream, m_uid, (char *)sp.mb_str(), &len, FT_UID);
+ char *cptr = (*fetchFunc)(stream, m_uid, sp.char_str(), &len, FT_UID);
m_folder->EndReading();
@@ -727,7 +727,7 @@
const char *cptr = DoGetPartAny(mimepart, &len, mail_fetch_mime);
if ( cptr )
{
- s.assign(wxConvertMB2WX(cptr), len);
+ s = wxString::From8BitData(cptr, len);
}
return s;
Modified: trunk/M/src/modules/Filters.cpp
===================================================================
--- trunk/M/src/modules/Filters.cpp 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/src/modules/Filters.cpp 2007-06-06 00:11:31 UTC (rev 7280)
@@ -3214,7 +3214,7 @@
"which allows one to apply different tests and operations "
"to messages, like sorting, replying or moving them "
"automatically."))
- MMODULE_PROP(_T("author"), _T("Karsten Ball\xFCder <[email protected]>"))
+ MMODULE_PROP(_T("author"), _T("Karsten Ballueder <[email protected]>"))
MMODULE_END_IMPLEMENT(MModule_FiltersImpl)
FilterRule *
Modified: trunk/M/src/modules/Mdummy.cpp
===================================================================
--- trunk/M/src/modules/Mdummy.cpp 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/src/modules/Mdummy.cpp 2007-06-06 00:11:31 UTC (rev 7280)
@@ -47,7 +47,7 @@
"it simply gets loaded, opens a dialog and "
"that's all. It's purpose is to serve as an "
"example and template for writing real modules."))
- MMODULE_PROP(_T("author"), _T("Karsten Ball\xFCder <[email protected]>"))
+ MMODULE_PROP(_T("author"), _T("Karsten Ballueder <[email protected]>"))
MMODULE_END_IMPLEMENT(DummyModule)
Modified: trunk/M/src/modules/TextViewer.cpp
===================================================================
--- trunk/M/src/modules/TextViewer.cpp 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/src/modules/TextViewer.cpp 2007-06-06 00:11:31 UTC (rev 7280)
@@ -513,9 +513,12 @@
// ctor
// ----------------------------------------------------------------------------
-IMPLEMENT_MESSAGE_VIEWER(TextViewer,
- _("Text only message viewer"),
- _T("(c) 2001 Vadim Zeitlin <[email protected]>"));
+IMPLEMENT_MESSAGE_VIEWER
+(
+ TextViewer,
+ _("Text only message viewer"),
+ gettext_noop("(c) 2001 Vadim Zeitlin <[email protected]>")
+);
TextViewer::TextViewer()
{
Modified: trunk/M/src/modules/viewflt/QuoteURL.cpp
===================================================================
--- trunk/M/src/modules/viewflt/QuoteURL.cpp 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/src/modules/viewflt/QuoteURL.cpp 2007-06-06 00:11:31 UTC (rev 7280)
@@ -140,7 +140,7 @@
void ReadOptions(Options& options, Profile *profile);
// get the quote level for the line (prev is for CountQuoteLevel() only)
- size_t GetQuotedLevel(const char *line, QuoteData& quote) const;
+ size_t GetQuotedLevel(const wxChar *line, QuoteData& quote) const;
// get the colour for the given quote level
wxColour GetQuoteColour(size_t qlevel) const;
@@ -216,7 +216,7 @@
// ----------------------------------------------------------------------------
size_t
-QuoteURLFilter::GetQuotedLevel(const char *line, QuoteData& quoteData) const
+QuoteURLFilter::GetQuotedLevel(const wxChar *line, QuoteData& quoteData) const
{
size_t qlevel = CountQuoteLevel
(
Modified: trunk/M/src/util/matchurl.cpp
===================================================================
--- trunk/M/src/util/matchurl.cpp 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/src/util/matchurl.cpp 2007-06-06 00:11:31 UTC (rev 7280)
@@ -766,8 +766,8 @@
{
// also check that we have at least one dot in the domain part for the
// mail addresses
- const char *
- pDot = (char *)memchr(text + pos + 1, '.', p - text - pos - 1);
+ const wxChar *
+ pDot = (wxChar *)memchr(text + pos + 1, '.', p - text - pos - 1);
if ( !pDot )
{
good = false;
Modified: trunk/M/src/util/strutil.cpp
===================================================================
--- trunk/M/src/util/strutil.cpp 2007-06-05 23:51:10 UTC (rev 7279)
+++ trunk/M/src/util/strutil.cpp 2007-06-06 00:11:31 UTC (rev 7280)
@@ -456,7 +456,7 @@
do
{
entry = getpwent();
- if(entry && entry->pw_name == wxConvertWX2MB(user))
+ if(entry && entry->pw_name == user)
break;
} while(entry);
if(entry)
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 DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.