Update of /cvsroot/mahogany/M/src/adb
In directory usw-pr-cvs1:/tmp/cvs-serv7348/src/adb
Modified Files:
AdbDialogs.cpp AdbEntry.cpp AdbFrame.cpp AdbModule.cpp
AdbProvider.cpp ExportPalm.cpp ExportText.cpp ProvBbdb.cpp
ProvDummy.cpp ProvFC.cpp ProvPalm.cpp ProvPasswd.cpp
Log Message:
Unicode fixes
Index: AdbDialogs.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/AdbDialogs.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -b -u -2 -r1.21 -r1.22
--- AdbDialogs.cpp 8 Sep 2002 19:23:08 -0000 1.21
+++ AdbDialogs.cpp 13 Sep 2002 01:27:46 -0000 1.22
@@ -613,5 +613,5 @@
_("Native address book to create: "),
frame,
- "AdbImportBook",
+ _T("AdbImportBook"),
adbname) )
{
Index: AdbEntry.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/AdbEntry.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -b -u -2 -r1.10 -r1.11
--- AdbEntry.cpp 27 Jun 2002 09:46:18 -0000 1.10
+++ AdbEntry.cpp 13 Sep 2002 01:27:46 -0000 1.11
@@ -127,5 +127,5 @@
int
-AdbEntryStoredInMemory::Matches(const char *szWhat, int where, int how) const
+AdbEntryStoredInMemory::Matches(const wxChar *szWhat, int where, int how) const
{
wxString strWhat;
Index: AdbFrame.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/AdbFrame.cpp,v
retrieving revision 1.95
retrieving revision 1.96
diff -b -u -2 -r1.95 -r1.96
--- AdbFrame.cpp 12 Sep 2002 02:36:49 -0000 1.95
+++ AdbFrame.cpp 13 Sep 2002 01:27:47 -0000 1.96
@@ -118,14 +118,14 @@
};
-static const char *aszConfigNames[] =
+static const wxChar *aszConfigNames[] =
{
- "LastNewEntry",
- "LastNewWasGroup",
- "AddressBooks",
- "Providers",
- "ExpandedBranches",
- "TreeSelection",
- "FindWhere",
- "FindOptions"
+ _T("LastNewEntry"),
+ _T("LastNewWasGroup"),
+ _T("AddressBooks"),
+ _T("Providers"),
+ _T("ExpandedBranches"),
+ _T("TreeSelection"),
+ _T("FindWhere"),
+ _T("FindOptions")
};
@@ -416,5 +416,5 @@
// overriden base class virtuals
- virtual AdbTreeElement *FindChild(const char *szName);
+ virtual AdbTreeElement *FindChild(const wxChar *szName);
virtual void LoadChildren();
@@ -447,5 +447,5 @@
struct FieldInfo
{
- const char *label; // or the caption
+ const wxChar *label; // or the caption
FieldType type; // and the type from the enum FieldType abvoe
};
@@ -1980,5 +1980,5 @@
wxString strGoto;
if ( MInputBox(&strGoto, _("Go to entry/group"),
- _("Full entry &name:"), this, "GoTo") ) {
+ _("Full entry &name:"), this, _T("GoTo")) ) {
MoveSelection(strGoto);
}
@@ -2140,5 +2140,5 @@
{
wxString strMsg = _("Enter the address book name");
- if ( !MInputBox(&strAdbName, strTitle, strMsg, this, "LastAdbName") )
+ if ( !MInputBox(&strAdbName, strTitle, strMsg, this, _T("LastAdbName")) )
return FALSE;
}
@@ -2151,5 +2151,5 @@
AdbDataProvider *pProvider = info->CreateProvider();
- bool ok = OpenAdb(strAdbName, pProvider, String(info->szName)); //FIXME Nerijus
String()?
+ bool ok = OpenAdb(strAdbName, pProvider, info->szName);
if ( ok ) {
@@ -3122,14 +3122,14 @@
// add images to our image list
- static const char *aszImages[] =
+ static const wxChar *aszImages[] =
{
// should be in sync with the corresponding enum in wxAdbTree
- "adb_library",
- "adb_book",
- "adb_address",
- "adb_opened",
- "adb_closed",
- "adb_palmos",
- "adb_bbdb"
+ _T("adb_library"),
+ _T("adb_book"),
+ _T("adb_address"),
+ _T("adb_opened"),
+ _T("adb_closed"),
+ _T("adb_palmos"),
+ _T("adb_bbdb")
};
@@ -3236,8 +3236,8 @@
// add images to our image list
- static const char *aszImages[] =
+ static const wxChar *aszImages[] =
{
// should be in sync with the corresponding enum
- "general", "email", "home", "work"
+ _T("general"), _T("email"), _T("home"), _T("work")
};
@@ -3587,5 +3587,5 @@
}
- dc.GetTextExtent(wxGetTranslation(String(fields[n].label)), &width, NULL);
+ dc.GetTextExtent(wxGetTranslation(fields[n].label), &width, NULL);
if ( width > widthMax )
widthMax = width;
@@ -3602,17 +3602,17 @@
// fall through -- for now they're the same as text
case AdbTreeEntry::FieldText:
- last = CreateTextWithLabel(wxGetTranslation(String(fields[n].label)),
widthMax, last);
+ last = CreateTextWithLabel(wxGetTranslation(fields[n].label), widthMax, last);
break;
case AdbTreeEntry::FieldMemo:
- last = CreateMultiLineText(wxGetTranslation(String(fields[n].label)), last);
+ last = CreateMultiLineText(wxGetTranslation(fields[n].label), last);
break;
case AdbTreeEntry::FieldList:
- last = CreateListBox(wxGetTranslation(String(fields[n].label)), last);
+ last = CreateListBox(wxGetTranslation(fields[n].label), last);
break;
case AdbTreeEntry::FieldBool:
- last = CreateCheckBox(wxGetTranslation(String(fields[n].label)), last);
+ last = CreateCheckBox(wxGetTranslation(fields[n].label), last);
break;
@@ -4203,5 +4203,5 @@
// find the ADB by name
-AdbTreeElement *AdbTreeRoot::FindChild(const char *szName)
+AdbTreeElement *AdbTreeRoot::FindChild(const wxChar *szName)
{
size_t nCount = m_children.Count();
@@ -4210,5 +4210,5 @@
strAdbName = ((AdbTreeBook *)m_children[n])->GetName();
- if ( strAdbName.IsSameAs(String(szName)/*FIXME Nerijus*/,
wxARE_FILENAMES_CASE_SENSITIVE) )
+ if ( strAdbName.IsSameAs(szName, wxARE_FILENAMES_CASE_SENSITIVE) )
return m_children[n];
}
Index: AdbModule.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/AdbModule.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -u -2 -r1.3 -r1.4
--- AdbModule.cpp 12 Sep 2002 02:36:49 -0000 1.3
+++ AdbModule.cpp 13 Sep 2002 01:27:47 -0000 1.4
@@ -49,5 +49,5 @@
// ----------------------------------------------------------------------------
-size_t AdbModule::EnumModules(const char *kind,
+size_t AdbModule::EnumModules(const wxChar *kind,
wxArrayString& names, wxArrayString& descs)
{
@@ -81,5 +81,5 @@
}
-AdbModule *AdbModule::GetModuleByName(const char *kind, const String& name)
+AdbModule *AdbModule::GetModuleByName(const wxChar *kind, const String& name)
{
AdbModule *importer = NULL;
@@ -115,5 +115,5 @@
// ----------------------------------------------------------------------------
-AdbModule::AdbModuleInfo *AdbModule::GetAdbModuleInfo(const char *kind)
+AdbModule::AdbModuleInfo *AdbModule::GetAdbModuleInfo(const wxChar *kind)
{
#ifdef USE_ADB_MODULES
Index: AdbProvider.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/AdbProvider.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -b -u -2 -r1.5 -r1.6
--- AdbProvider.cpp 8 Sep 2002 19:23:08 -0000 1.5
+++ AdbProvider.cpp 13 Sep 2002 01:27:47 -0000 1.6
@@ -34,8 +34,8 @@
AdbDataProvider::AdbProviderInfo *AdbDataProvider::ms_listProviders = NULL;
-AdbDataProvider::AdbProviderInfo::AdbProviderInfo(const char *name,
+AdbDataProvider::AdbProviderInfo::AdbProviderInfo(const wxChar *name,
Constructor ctor,
bool canCreate,
- const char *formatName,
+ const wxChar *formatName,
AdbNameFormat adbFormat)
{
Index: ExportPalm.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/ExportPalm.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -b -u -2 -r1.11 -r1.12
--- ExportPalm.cpp 28 Jan 2001 13:24:06 -0000 1.11
+++ ExportPalm.cpp 13 Sep 2002 01:27:47 -0000 1.12
@@ -104,11 +104,11 @@
private:
// the profile path for saving the last file used
- static const char *ms_profilePathLastFile;
+ static const wxChar *ms_profilePathLastFile;
// the profile path for saving the last category used
- static const char *ms_profilePathLastCategory;
+ static const wxChar *ms_profilePathLastCategory;
// the profile path for saving the include empty flag
- static const char *ms_profileIncludeEmpty;
+ static const wxChar *ms_profileIncludeEmpty;
// the profile path for saving the include comments flag
- static const char *ms_profileIncludeComments;
+ static const wxChar *ms_profileIncludeComments;
// the data
@@ -349,15 +349,15 @@
// ----------------------------------------------------------------------------
-const char *wxAdbPalmExporterConfigDialog::ms_profilePathLastFile
- = "Settings/AdbPalmExportFile";
+const wxChar *wxAdbPalmExporterConfigDialog::ms_profilePathLastFile
+ = _T("Settings/AdbPalmExportFile");
-const char *wxAdbPalmExporterConfigDialog::ms_profilePathLastCategory
- = "Settings/AdbPalmExportCategory";
+const wxChar *wxAdbPalmExporterConfigDialog::ms_profilePathLastCategory
+ = _T("Settings/AdbPalmExportCategory");
-const char *wxAdbPalmExporterConfigDialog::ms_profileIncludeEmpty
- = "Settings/AdbPalmExportIncludeEmpty";
+const wxChar *wxAdbPalmExporterConfigDialog::ms_profileIncludeEmpty
+ = _T("Settings/AdbPalmExportIncludeEmpty");
-const char *wxAdbPalmExporterConfigDialog::ms_profileIncludeComments
- = "Settings/AdbPalmExportIncludeComments";
+const wxChar *wxAdbPalmExporterConfigDialog::ms_profileIncludeComments
+ = _T("Settings/AdbPalmExportIncludeComments");
wxAdbPalmExporterConfigDialog::wxAdbPalmExporterConfigDialog
Index: ExportText.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/ExportText.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -b -u -2 -r1.7 -r1.8
--- ExportText.cpp 6 Jun 2000 12:17:36 -0000 1.7
+++ ExportText.cpp 13 Sep 2002 01:27:47 -0000 1.8
@@ -110,5 +110,5 @@
private:
// the profile path for saving the last file used
- static const char *ms_profilePathLastFile;
+ static const wxChar *ms_profilePathLastFile;
// the data
@@ -289,6 +289,6 @@
// ----------------------------------------------------------------------------
-const char *wxAdbTextExporterConfigDialog::ms_profilePathLastFile
- = "Settings/AdbTextExportFile";
+const wxChar *wxAdbTextExporterConfigDialog::ms_profilePathLastFile
+ = _T("Settings/AdbTextExportFile");
wxAdbTextExporterConfigDialog::wxAdbTextExporterConfigDialog
Index: ProvBbdb.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/ProvBbdb.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -b -u -2 -r1.28 -r1.29
--- ProvBbdb.cpp 12 Sep 2002 02:36:49 -0000 1.28
+++ ProvBbdb.cpp 13 Sep 2002 01:27:47 -0000 1.29
@@ -131,5 +131,5 @@
// an easier to use GetName()
- const char *GetName() const
+ const wxChar *GetName() const
{ return m_astrFields[0]; }
@@ -146,5 +146,5 @@
static bool ReadNil(String *line);
static bool ReadHeader(String *version, String *line);
- static bool ReadToken(char token, String *string);
+ static bool ReadToken(wxChar token, String *string);
static int m_IgnoreAnonymous; // really a bool,set to -1 at beginnin
@@ -191,5 +191,5 @@
virtual void DeleteGroup(const String& strName);
- virtual AdbEntry *FindEntry(const char *szName);
+ virtual AdbEntry *FindEntry(const wxChar *szName);
private:
@@ -237,5 +237,5 @@
{ m_pRootGroup->DeleteGroup(strName); }
- virtual AdbEntry *FindEntry(const char *szName)
+ virtual AdbEntry *FindEntry(const wxChar *szName)
{ return m_pRootGroup->FindEntry(szName); }
@@ -285,5 +285,5 @@
};
-IMPLEMENT_ADB_PROVIDER(BbdbDataProvider, TRUE, "BBDB version 2", Name_File);
+IMPLEMENT_ADB_PROVIDER(BbdbDataProvider, TRUE, _T("BBDB version 2"), Name_File);
// ============================================================================
@@ -308,5 +308,5 @@
bool
-BbdbEntry::ReadToken(char token, String * line)
+BbdbEntry::ReadToken(wxChar token, String * line)
{
if(!line || line->empty())
@@ -367,5 +367,5 @@
{
// numbers are treated as strings, but have no quotes
- if(line[0u]>='0' && line[0u] <= '9')
+ if(line[0u]>=_T('0') && line[0u] <= _T('9'))
isnumber = true;
else
@@ -381,5 +381,5 @@
strutil_delwhitespace(*line);
String str = "";
- const char *cptr = line->c_str();
+ const wxChar *cptr = line->c_str();
bool escaped = false;
@@ -409,5 +409,5 @@
BbdbEntry::WriteString(ostream &out, String const &string)
{
- const char *cptr;
+ const wxChar *cptr;
if(string.empty())
@@ -548,5 +548,5 @@
{
e_exists->DecRef(); // GetEntry() does an IncRef()
- tmp.Printf("%d", count);
+ tmp.Printf(_T("%d"), count);
alias = temp;
alias << "_" << tmp;
@@ -676,5 +676,5 @@
wxString line, version;
int ignored = 0, entries_read = 0;
- ifstream file(strName);
+ ifstream file(strName.mb_str());
int length = 0;
@@ -769,5 +769,5 @@
String str;
- ofstream out(m_strName);
+ ofstream out(m_strName.mb_str());
size_t n,m;
out << ";;; file-version: 2" << endl;
@@ -949,5 +949,5 @@
AdbEntry *
-BbdbEntryGroup::FindEntry(const char *szName)
+BbdbEntryGroup::FindEntry(const wxChar *szName)
{
MOcheck();
@@ -1055,5 +1055,5 @@
if(wxFileExists(name))
{
- ifstream file(name);
+ ifstream file(name.mb_str());
String line;
strutil_getstrline(file, line);
Index: ProvDummy.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/ProvDummy.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -b -u -2 -r1.20 -r1.21
--- ProvDummy.cpp 8 Sep 2002 19:23:08 -0000 1.20
+++ ProvDummy.cpp 13 Sep 2002 01:27:47 -0000 1.21
@@ -78,8 +78,8 @@
virtual void ClearExtraEMails();
- virtual int Matches(const char *str, int where, int how) const;
+ virtual int Matches(const wxChar *str, int where, int how) const;
// an easier to use GetName()
- const char *GetName() const { return m_astrFields[0]; }
+ const wxChar *GetName() const { return m_astrFields[0]; }
// get path to our entry in config file
@@ -122,5 +122,5 @@
virtual void DeleteGroup(const String& strName);
- virtual AdbEntry *FindEntry(const char *szName);
+ virtual AdbEntry *FindEntry(const wxChar *szName);
// get the full path to our group (not '/' terminated)
@@ -171,5 +171,5 @@
{ m_pRootGroup->DeleteGroup(strName); }
- virtual AdbEntry *FindEntry(const char *szName)
+ virtual AdbEntry *FindEntry(const wxChar *szName)
{ return m_pRootGroup->FindEntry(szName); }
@@ -213,5 +213,5 @@
};
-IMPLEMENT_ADB_PROVIDER(DummyDataProvider, TRUE, "Dummy", Name_String);
+IMPLEMENT_ADB_PROVIDER(DummyDataProvider, TRUE, _T("Dummy"), Name_String);
// ============================================================================
@@ -269,5 +269,5 @@
}
-int DummyEntry::Matches(const char *what, int where, int how) const
+int DummyEntry::Matches(const wxChar *what, int where, int how) const
{
return 0;
@@ -337,5 +337,5 @@
}
-AdbEntry *DummyEntryGroup::FindEntry(const char *szName)
+AdbEntry *DummyEntryGroup::FindEntry(const wxChar *szName)
{
return NULL;
Index: ProvFC.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/ProvFC.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -b -u -2 -r1.36 -r1.37
--- ProvFC.cpp 8 Sep 2002 19:23:08 -0000 1.36
+++ ProvFC.cpp 13 Sep 2002 01:27:47 -0000 1.37
@@ -108,5 +108,5 @@
// an easier to use GetName()
- const char *GetName() const { return m_astrFields[0]; }
+ const wxChar *GetName() const { return m_astrFields[0]; }
// get path to our entry in config file
@@ -156,5 +156,5 @@
virtual void DeleteGroup(const String& strName);
- virtual AdbEntry *FindEntry(const char *szName);
+ virtual AdbEntry *FindEntry(const wxChar *szName);
// gte the config object
@@ -250,5 +250,5 @@
{ m_pRootGroup->DeleteGroup(strName); }
- virtual AdbEntry *FindEntry(const char *szName)
+ virtual AdbEntry *FindEntry(const wxChar *szName)
{ return m_pRootGroup->FindEntry(szName); }
@@ -299,5 +299,5 @@
};
-IMPLEMENT_ADB_PROVIDER(FCDataProvider, TRUE, "Native format", Name_File);
+IMPLEMENT_ADB_PROVIDER(FCDataProvider, TRUE, _T("Native format"), Name_File);
// ============================================================================
@@ -363,5 +363,5 @@
// first read all the fields (up to AdbField_Max)
wxString strCurrent;
- for ( const char *pc = strValue; ; pc++ ) {
+ for ( const wxChar *pc = strValue; ; pc++ ) {
if ( *pc == ':' || *pc == '\0' ) {
SetField(nField++, strCurrent);
@@ -408,5 +408,5 @@
wxString str;
GetField(AdbField_OtherEMails, &str);
- for ( const char *pc = str; ; pc++ ) {
+ for ( const wxChar *pc = str; ; pc++ ) {
if ( *pc == ',' || *pc == '\0' ) {
if ( !strCurrent.empty() )
@@ -469,5 +469,5 @@
if ( nEMail > 0 )
strField += ',';
- for ( const char *pc = m_astrEmails[nEMail]; *pc != '\0'; pc++ ) {
+ for ( const wxChar *pc = m_astrEmails[nEMail]; *pc != '\0'; pc++ ) {
if ( *pc == ',' )
strField += "\\,";
@@ -484,5 +484,5 @@
if ( nField > 1 )
strValue += ':';
- for ( const char *pc = strField; *pc != '\0'; pc++ ) {
+ for ( const wxChar *pc = strField; *pc != '\0'; pc++ ) {
switch ( *pc ) {
case ':':
@@ -662,5 +662,5 @@
}
-AdbEntry *FCEntryGroup::FindEntry(const char * /* szName */)
+AdbEntry *FCEntryGroup::FindEntry(const wxChar * /* szName */)
{
return NULL;
@@ -792,5 +792,5 @@
{
// the test is not 100% fool proof...
- FILE *fp = fopen(fullname, "rt");
+ FILE *fp = wxFopen(fullname, _T("rt"));
if ( fp != NULL )
{
@@ -834,5 +834,5 @@
file.Close();
- remove(fullname);
+ wxRemove(fullname);
}
}
Index: ProvPalm.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/ProvPalm.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -b -u -2 -r1.18 -r1.19
--- ProvPalm.cpp 8 Sep 2002 19:23:08 -0000 1.18
+++ ProvPalm.cpp 13 Sep 2002 01:27:47 -0000 1.19
@@ -262,5 +262,5 @@
}
-AdbEntry *PalmEntryGroup::FindEntry(const char * /* szName */)
+AdbEntry *PalmEntryGroup::FindEntry(const wxChar * /* szName */)
{
// currently not supported
Index: ProvPasswd.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/ProvPasswd.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -b -u -2 -r1.7 -r1.8
--- ProvPasswd.cpp 8 Sep 2002 19:23:08 -0000 1.7
+++ ProvPasswd.cpp 13 Sep 2002 01:27:47 -0000 1.8
@@ -89,5 +89,5 @@
virtual void ClearExtraEMails() { }
- virtual int Matches(const char *str, int where, int how) const;
+ virtual int Matches(const wxChar *str, int where, int how) const;
private:
@@ -127,5 +127,5 @@
virtual void DeleteGroup(const String& strName);
- virtual AdbEntry *FindEntry(const char *szName);
+ virtual AdbEntry *FindEntry(const wxChar *szName);
private:
@@ -181,5 +181,5 @@
{ m_pRootGroup->DeleteGroup(strName); }
- virtual AdbEntry *FindEntry(const char *szName)
+ virtual AdbEntry *FindEntry(const wxChar *szName)
{ return m_pRootGroup->FindEntry(szName); }
@@ -222,5 +222,5 @@
};
-IMPLEMENT_ADB_PROVIDER(PasswdDataProvider, true, "Unix /etc/passwd", Name_No);
+IMPLEMENT_ADB_PROVIDER(PasswdDataProvider, true, _T("Unix /etc/passwd"), Name_No);
// ============================================================================
@@ -274,5 +274,5 @@
}
-int PasswdEntry::Matches(const char *what, int where, int how) const
+int PasswdEntry::Matches(const wxChar *what, int where, int how) const
{
// substring lookup looks for a part of the string, "starts with" means
@@ -388,5 +388,5 @@
}
-AdbEntry *PasswdEntryGroup::FindEntry(const char *szName)
+AdbEntry *PasswdEntryGroup::FindEntry(const wxChar *szName)
{
// TODO
-------------------------------------------------------
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