Update of /cvsroot/mahogany/M/src/classes
In directory sc8-pr-cvs1:/tmp/cvs-serv25935/src/classes
Modified Files:
ComposeTemplate.cpp ConfigSource.cpp
Log Message:
unicode fixes
Index: ComposeTemplate.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/ComposeTemplate.cpp,v
retrieving revision 1.54
retrieving revision 1.55
diff -b -u -2 -r1.54 -r1.55
--- ComposeTemplate.cpp 30 Sep 2003 13:46:19 -0000 1.54
+++ ComposeTemplate.cpp 4 Oct 2003 14:52:37 -0000 1.55
@@ -1399,5 +1399,5 @@
if ( m_msg && READ_CONFIG_BOOL(m_profile, MP_REPLY_MSGPREFIX_FROM_XATTR) )
{
- m_msg->GetHeaderLine("X-Attribution", prefix);
+ m_msg->GetHeaderLine(_T("X-Attribution"), prefix);
}
Index: ConfigSource.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/ConfigSource.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -b -u -2 -r1.9 -r1.10
--- ConfigSource.cpp 30 Sep 2003 13:46:19 -0000 1.9
+++ ConfigSource.cpp 4 Oct 2003 14:52:37 -0000 1.10
@@ -61,5 +61,5 @@
// the type of the local config source
-#define CONFIG_SOURCE_TYPE_LOCAL "local"
+#define CONFIG_SOURCE_TYPE_LOCAL _T("local")
// ----------------------------------------------------------------------------
@@ -70,5 +70,5 @@
{
public:
- virtual const char *GetType() const { return CONFIG_SOURCE_TYPE_LOCAL; }
+ virtual const wxChar *GetType() const { return CONFIG_SOURCE_TYPE_LOCAL; }
virtual ConfigSource *Create(const ConfigSource& config, const String& name);
};
@@ -344,9 +344,9 @@
if ( !localFilePath.empty() )
{
- localFilePath << '/';
+ localFilePath << _T('/');
}
//else: it will be in the current one, what else can we do?
- localFilePath << '.' << M_APPLICATIONNAME;
+ localFilePath << _T('.') << M_APPLICATIONNAME;
if ( !wxDir::Exists(localFilePath) )
@@ -363,5 +363,6 @@
// also create an empty config file with the right permissions:
- String filename = localFilePath + "/config";
+ String filename;
+ filename << localFilePath << DIR_SEPARATOR << _T("config");
// pass false to Create() to avoid overwriting the existing file
@@ -379,5 +380,5 @@
// program unknowingly to the user!
struct stat st;
- if ( stat(localFilePath, &st) == 0 )
+ if ( wxStat(localFilePath, &st) == 0 )
{
if ( st.st_mode & (S_IWGRP | S_IWOTH) )
@@ -391,5 +392,5 @@
localFilePath.c_str());
- if ( chmod(localFilePath, st.st_mode & ~(S_IWGRP | S_IWOTH)) == 0 )
+ if ( chmod(localFilePath.fn_str(), st.st_mode & ~(S_IWGRP | S_IWOTH)) ==
0 )
{
msg += _("This has been fixed now, the directory is no longer writable
for others.");
@@ -413,10 +414,10 @@
}
- localFilePath += "/config";
+ localFilePath << DIR_SEPARATOR << _T("config");
// Check whether other users can read our config file.
//
// This must not be allowed as we store passwords in it!
- if ( stat(localFilePath, &st) == 0 )
+ if ( wxStat(localFilePath, &st) == 0 )
{
if ( st.st_mode & (S_IWGRP | S_IWOTH | S_IRGRP | S_IROTH) )
@@ -436,5 +437,5 @@
{
if ( !msg.empty() )
- msg += "\n\n";
+ msg += _T("\n\n");
msg += String::Format
@@ -447,7 +448,7 @@
}
- msg += "\n\n";
+ msg += _T("\n\n");
- if ( chmod(localFilePath, S_IRUSR | S_IWUSR) == 0 )
+ if ( chmod(localFilePath.fn_str(), S_IRUSR | S_IWUSR) == 0 )
{
msg += _("This has been fixed now, the file is no longer readable for
others.");
@@ -471,13 +472,13 @@
// 3. default installation dir
String globalFileName;
- globalFileName << M_APPLICATIONNAME << ".conf";
- globalFilePath << M_PREFIX << "/etc/" << globalFileName;
+ globalFileName << M_APPLICATIONNAME << _T(".conf");
+ globalFilePath << M_PREFIX << DIR_SEPARATOR << _T("etc") << DIR_SEPARATOR <<
globalFileName;
if ( !wxFileExists(globalFilePath) )
{
- const char *dir = getenv("MAHOGANY_DIR");
+ const wxChar *dir = wxGetenv(_T("MAHOGANY_DIR"));
if ( dir )
{
globalFilePath.clear();
- globalFilePath << dir << "/etc/" << globalFileName;
+ globalFilePath << dir << DIR_SEPARATOR << _T("etc") << DIR_SEPARATOR <<
globalFileName;
}
}
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates