Update of /cvsroot/mahogany/M/src/adb
In directory usw-pr-cvs1:/tmp/cvs-serv3800/src/adb

Modified Files:
        AdbFrame.cpp AdbImport.cpp AdbManager.cpp AdbModule.cpp 
        ImportPine.cpp ImportText.cpp ImportVCard.cpp ProvBbdb.cpp 
Log Message:
more Unicode fixes

Index: AdbFrame.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/AdbFrame.cpp,v
retrieving revision 1.94
retrieving revision 1.95
diff -b -u -2 -r1.94 -r1.95
--- AdbFrame.cpp        8 Sep 2002 19:23:08 -0000       1.94
+++ AdbFrame.cpp        12 Sep 2002 02:36:49 -0000      1.95
@@ -328,5 +328,5 @@
 
     // find child by name (returns NULL if not found)
-  virtual AdbTreeElement *FindChild(const char *szName);
+  virtual AdbTreeElement *FindChild(const wxChar *szName);
 
     // load all children from the config file (but don't add them to the tree).
@@ -391,5 +391,5 @@
   // accessors
     // return the file name (NB: not really always a file name...)
-  const char *GetName() const { return m_pBook->GetName(); }
+  const wxChar *GetName() const { return m_pBook->GetName(); }
 
   size_t GetNumberOfEntries() const { return m_pBook->GetNumberOfEntries(); }
@@ -715,5 +715,5 @@
   // find all entries which match the string under "root" (or the current
   // entry if root == NULL). '*' and '?' are recognized, case sensitive.
-  void DoFind(const char *szFindWhat, AdbTreeNode *root = NULL);
+  void DoFind(const wxChar *szFindWhat, AdbTreeNode *root = NULL);
   // moves selection to the next item (previously found by DoFind())
   void AdvanceToNextFound();
@@ -728,5 +728,5 @@
   bool OpenAdb(const wxString& strPath,
                AdbDataProvider *pProvider = NULL,
-               const char *szProvName = NULL);
+               const wxChar *szProvName = NULL);
   // ask the user for filename and create or open the address book
   bool CreateOrOpenAdb(bool bDoCreate);
@@ -924,5 +924,5 @@
 {
 public:
-  wxAdbPage(wxNotebook *notebook, const char *title, int idImage,
+  wxAdbPage(wxNotebook *notebook, const wxChar *title, int idImage,
             size_t nFirstField, size_t nLastField);
 
@@ -954,8 +954,8 @@
 
   // all the functions should be given translated label!
-  wxTextCtrl *CreateMultiLineText(const char *label, wxControl *last);
-  wxListBox  *CreateListBox(const char *label, wxControl *last);
-  wxCheckBox *CreateCheckBox(const char *label, wxControl *last);
-  wxTextCtrl *CreateTextWithLabel(const char *label, long w, wxControl *last);
+  wxTextCtrl *CreateMultiLineText(const wxChar *label, wxControl *last);
+  wxListBox  *CreateListBox(const wxChar *label, wxControl *last);
+  wxCheckBox *CreateCheckBox(const wxChar *label, wxControl *last);
+  wxTextCtrl *CreateTextWithLabel(const wxChar *label, long w, wxControl *last);
 
   ArrayControls  m_aEntries;
@@ -972,5 +972,5 @@
 public:
   wxAdbNamePage(wxNotebook *notebook)
-    : wxAdbPage(notebook, "General", wxAdbNotebook::General,
+    : wxAdbPage(notebook, _T("General"), wxAdbNotebook::General,
                 AdbField_NamePageFirst, AdbField_NamePageLast) { }
 };
@@ -981,5 +981,5 @@
 public:
   wxAdbEMailPage(wxNotebook *notebook)
-    : wxAdbPage(notebook, "Email", wxAdbNotebook::EMail,
+    : wxAdbPage(notebook, _T("Email"), wxAdbNotebook::EMail,
                 AdbField_EMailPageFirst, AdbField_EMailPageLast) { }
 
@@ -1010,5 +1010,5 @@
 {
 public:
-  wxAdbAddrPage(wxNotebook *notebook, const char *title,
+  wxAdbAddrPage(wxNotebook *notebook, const wxChar *title,
                 int idImage, bool bOffice);
 };
@@ -1019,5 +1019,5 @@
 public:
   wxAdbOfficeAddrPage(wxNotebook *notebook)
-    : wxAdbAddrPage(notebook, "Office", wxAdbNotebook::Work, TRUE) { }
+    : wxAdbAddrPage(notebook, _T("Office"), wxAdbNotebook::Work, TRUE) { }
 };
 
@@ -1027,5 +1027,5 @@
 public:
   wxAdbHomeAddrPage(wxNotebook *notebook)
-    : wxAdbAddrPage(notebook, "Home", wxAdbNotebook::Home, FALSE) { }
+    : wxAdbAddrPage(notebook, _T("Home"), wxAdbNotebook::Home, FALSE) { }
 };
 
@@ -1377,5 +1377,5 @@
     String bookAutoCollect = READ_APPCONFIG_TEXT(MP_AUTOCOLLECT_ADB);
     if ( !IsAbsPath(bookAutoCollect) ) {
-      bookAutoCollect.Prepend(mApplication->GetLocalDir() + '/');
+      bookAutoCollect.Prepend(mApplication->GetLocalDir() + _T('/'));
     }
     m_astrAdb.Add(bookAutoCollect);
@@ -1419,5 +1419,5 @@
   // there should be one provider name for each address book
   if ( nCountAdb != m_astrProviders.Count() ) {
-    wxLogDebug("different number of address books and providers!");
+    wxLogDebug(_T("different number of address books and providers!"));
 
     // try to correct it somehow (our method is not the best, but it's simple
@@ -1437,5 +1437,5 @@
     // GetProviderByName would return NULL anyhow, but why call it in the
     // first place?
-    if ( IsEmpty(strProv) )
+    if ( wxIsEmpty(strProv) )
       pProvider = NULL;
     else
@@ -1553,5 +1553,5 @@
 bool wxAdbEditFrame::OpenAdb(const wxString& strPath,
                              AdbDataProvider *pProvider,
-                             const char *szProvName)
+                             const wxChar *szProvName)
 {
   // check that we don't already have it
@@ -1642,5 +1642,5 @@
   // prepare strings for diagnostic messages
   wxString strWhere, strGroup = group->GetWhere();
-  wxString strWhat = wxGetTranslation(m_bLastNewWasGroup ? "group" : "entry");
+  wxString strWhat = wxGetTranslation(m_bLastNewWasGroup ? _T("group") : _T("entry"));
 
   // first check that it doesn't already exist
@@ -1710,5 +1710,5 @@
         wxString bookname = m_astrAdb[n];
         if ( !IsAbsPath(bookname) ) {
-          bookname = mApplication->GetLocalDir() + '/' + bookname;
+          bookname = mApplication->GetLocalDir() + _T('/') + bookname;
         }
 #ifdef __WXMSW__
@@ -1735,5 +1735,5 @@
   else {
     // it's a normal entry or group
-    strWhat = wxGetTranslation(m_current->IsGroup() ? "group" : "entry");
+    strWhat = wxGetTranslation(m_current->IsGroup() ? _T("group") : _T("entry"));
     strName = m_current->GetName();
 
@@ -1842,5 +1842,5 @@
 
 // find all entries which match the given string
-void wxAdbEditFrame::DoFind(const char *szFindWhat, AdbTreeNode *root)
+void wxAdbEditFrame::DoFind(const wxChar *szFindWhat, AdbTreeNode *root)
 {
   // start from the current group if root is not specified
@@ -2022,10 +2022,10 @@
          wxString name = book->GetName();
          if ( !book->Flush() )
-            wxLogError("Couldn't flush book '%s'!", name.c_str());
+            wxLogError(_T("Couldn't flush book '%s'!"), name.c_str());
          else
-            wxLogStatus(this, "Book '%s' flushed.", name.c_str());
+            wxLogStatus(this, _T("Book '%s' flushed."), name.c_str());
       }
       else {
-         wxLogError("Select a book to flush");
+         wxLogError(_T("Select a book to flush"));
       }
       break;
@@ -2123,6 +2123,6 @@
                       strTitle,
                       READ_APPCONFIG_TEXT(MP_USERDIR),
-                      "M.adb",
-                      "adb",
+                      _T("M.adb"),
+                      _T("adb"),
                       _("Address books (*.adb)|*.adb|All files (*.*)|*.*"),
                       wxHIDE_READONLY | (bDoCreate ? 0 : wxFILE_MUST_EXIST),
@@ -2151,5 +2151,5 @@
   AdbDataProvider *pProvider = info->CreateProvider();
 
-  bool ok = OpenAdb(strAdbName, pProvider, info->szName);
+  bool ok = OpenAdb(strAdbName, pProvider, String(info->szName)); //FIXME Nerijus 
+String()?
 
   if ( ok ) {
@@ -2228,6 +2228,6 @@
                         _("Choose the name of vCard file"),
                         READ_APPCONFIG_TEXT(MP_USERDIR),
-                        "vcard.vcf",
-                        "vcf",
+                        _T("vcard.vcf"),
+                        _T("vcf"),
                         _("vCard files (*.vcf)|*.vcf|All files (*.*)|*.*"),
                         wxHIDE_READONLY,
@@ -2275,6 +2275,6 @@
                         _("Choose the name of vCard file"),
                         READ_APPCONFIG_TEXT(MP_USERDIR),
-                        "vcard.vcf",
-                        "vcf",
+                        _T("vcard.vcf"),
+                        _T("vcf"),
                         _("vCard files (*.vcf)|*.vcf|All files (*.*)|*.*"),
                         wxHIDE_READONLY | wxFILE_MUST_EXIST,
@@ -2729,5 +2729,5 @@
   // ---------------------
 
-  const char *label = _("Find &what:");
+  const wxChar *label = _("Find &what:");
   long widthLabel, heightLabel;
   wxClientDC dc(this);
@@ -2882,5 +2882,5 @@
      m_strName(strName), m_bGroup(bGroup)
 {
-  const char *label = _("&New entry/group name:");
+  const wxChar *label = _("&New entry/group name:");
 
   // layout
@@ -2956,5 +2956,5 @@
   if ( m_strName.IsEmpty() ) {
     wxLogError(_("Please specify a name for the new %s!"),
-               wxGetTranslation(m_bGroup ? "group" : "entry"));
+               wxGetTranslation(m_bGroup ? _T("group") : _T("entry")));
     return FALSE;
   }
@@ -2977,14 +2977,14 @@
   // ------
 
-  static const char *labels[] = {
-    "&Name:",
-    "File name:",
-    "File size:",
-    "&Description: ",
-    "Number of entries: "
+  static const wxChar *labels[] = {
+    _T("&Name:"),
+    _T("File name:"),
+    _T("File size:"),
+    _T("&Description: "),
+    _T("Number of entries: ")
   };
 
   // translated lables
-  const char *labelsT[WXSIZEOF(labels)];
+  const wxChar *labelsT[WXSIZEOF(labels)];
 
   size_t n, x, y, dy;
@@ -3077,5 +3077,5 @@
     wxFile file(filename);
     if ( file.IsOpened() ) {
-      str.Printf("%lu", (unsigned long)file.Length());
+      str.Printf(_T("%lu"), (unsigned long)file.Length());
     }
     else {
@@ -3091,5 +3091,5 @@
   m_staticFileName->SetLabel(filename);
 
-  str.Printf("%ld", (unsigned long)m_book->GetNumberOfEntries());
+  str.Printf(_T("%ld"), (unsigned long)m_book->GetNumberOfEntries());
   m_staticNumEntries->SetLabel(str);
 
@@ -3334,5 +3334,5 @@
 // base notebook page
 // -----------------------------------------------------------------------------
-wxAdbPage::wxAdbPage(wxNotebook *notebook, const char *title, int idImage,
+wxAdbPage::wxAdbPage(wxNotebook *notebook, const wxChar *title, int idImage,
                      size_t nFirstField, size_t nLastField)
          : wxPanel(notebook, -1)
@@ -3433,5 +3433,5 @@
 
 // create a single-line text control with a label
-wxTextCtrl *wxAdbPage::CreateTextWithLabel(const char *label,
+wxTextCtrl *wxAdbPage::CreateTextWithLabel(const wxChar *label,
                                            long widthMax,
                                            wxControl *last)
@@ -3463,5 +3463,5 @@
 
 // create a multi-line text control with a label
-wxTextCtrl *wxAdbPage::CreateMultiLineText(const char *label, wxControl *last)
+wxTextCtrl *wxAdbPage::CreateMultiLineText(const wxChar *label, wxControl *last)
 {
   wxStaticText *pLabel = new wxStaticText(this, -1, label);
@@ -3477,5 +3477,5 @@
 // NB: we consider that there is only one listbox (at most) per page, so
 //     the button ids are always the same
-wxListBox *wxAdbPage::CreateListBox(const char *label, wxControl *last)
+wxListBox *wxAdbPage::CreateListBox(const wxChar *label, wxControl *last)
 {
   // a box around all this stuff
@@ -3492,11 +3492,11 @@
   // the buttons vertically on the right of listbox
   wxButton *button = NULL;
-  static const char *aszLabels[] =
+  static const wxChar *aszLabels[] =
   {
-    "&Add",
-    "&Modify",
-    "&Delete",
+    _T("&Add"),
+    _T("&Modify"),
+    _T("&Delete"),
   };
-  const char *aszLabelsT[WXSIZEOF(aszLabels)];  // translated labels
+  const wxChar *aszLabelsT[WXSIZEOF(aszLabels)];  // translated labels
 
   // should be in sync with enum!
@@ -3544,5 +3544,5 @@
 
 // create a checkbox
-wxCheckBox *wxAdbPage::CreateCheckBox(const char *label, wxControl *last)
+wxCheckBox *wxAdbPage::CreateCheckBox(const wxChar *label, wxControl *last)
 {
   wxCheckBox *checkbox = new wxCheckBox(this, -1, label);
@@ -3587,5 +3587,5 @@
     }
 
-    dc.GetTextExtent(_(fields[n].label), &width, NULL);
+    dc.GetTextExtent(wxGetTranslation(String(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(_(fields[n].label), widthMax, last);
+        last = CreateTextWithLabel(wxGetTranslation(String(fields[n].label)), 
+widthMax, last);
         break;
 
       case AdbTreeEntry::FieldMemo:
-        last = CreateMultiLineText(_(fields[n].label), last);
+        last = CreateMultiLineText(wxGetTranslation(String(fields[n].label)), last);
         break;
 
       case AdbTreeEntry::FieldList:
-        last = CreateListBox(_(fields[n].label), last);
+        last = CreateListBox(wxGetTranslation(String(fields[n].label)), last);
         break;
 
       case AdbTreeEntry::FieldBool:
-        last = CreateCheckBox(_(fields[n].label), last);
+        last = CreateCheckBox(wxGetTranslation(String(fields[n].label)), last);
         break;
 
@@ -3738,5 +3738,5 @@
 }
 
-wxAdbAddrPage::wxAdbAddrPage(wxNotebook *notebook, const char *title,
+wxAdbAddrPage::wxAdbAddrPage(wxNotebook *notebook, const wxChar *title,
                              int idImage, bool bOffice)
              : wxAdbPage(notebook, title, idImage,
@@ -4096,5 +4096,5 @@
 }
 
-AdbTreeElement *AdbTreeNode::FindChild(const char *szName)
+AdbTreeElement *AdbTreeNode::FindChild(const wxChar *szName)
 {
   // TODO we should sort the items in alphabetical order and use binary search
@@ -4210,5 +4210,5 @@
     strAdbName = ((AdbTreeBook *)m_children[n])->GetName();
 
-    if ( strAdbName.IsSameAs(szName, wxARE_FILENAMES_CASE_SENSITIVE) )
+    if ( strAdbName.IsSameAs(String(szName)/*FIXME Nerijus*/, 
+wxARE_FILENAMES_CASE_SENSITIVE) )
       return m_children[n];
   }

Index: AdbImport.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/AdbImport.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -b -u -2 -r1.18 -r1.19
--- AdbImport.cpp       3 Jul 2002 17:05:45 -0000       1.18
+++ AdbImport.cpp       12 Sep 2002 02:36:49 -0000      1.19
@@ -93,6 +93,6 @@
       if ( !entryName )
       {
-         wxLogDebug("Autogenerating nickname for nameless address "
-                    "entry %lu in '%s'", (unsigned long)nEntry, path.c_str());
+         wxLogDebug(_T("Autogenerating nickname for nameless address entry %lu in 
+'%s'"),
+                    (unsigned long)nEntry, path.c_str());
 
          entryName.Printf(_("Nameless entry %d"), ++nAnonIndex);

Index: AdbManager.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/AdbManager.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -b -u -2 -r1.36 -r1.37
--- AdbManager.cpp      8 Sep 2002 19:23:08 -0000       1.36
+++ AdbManager.cpp      12 Sep 2002 02:36:49 -0000      1.37
@@ -109,5 +109,5 @@
   if ( aGroups ) {
      // we'll use it below
-     nameMatch = what.Lower() + '*';
+     nameMatch = what.Lower() + _T('*');
 
      // is it a book?
@@ -356,5 +356,5 @@
     ms_pManager->IncRef();
 
-    wxLogTrace("adb", "AdbManager created.");
+    wxLogTrace(_T("adb"), _T("AdbManager created."));
   }
   else {
@@ -378,5 +378,5 @@
     ms_pManager = NULL;
 
-    wxLogTrace("adb", "AdbManager deleted.");
+    wxLogTrace(_T("adb"), _T("AdbManager deleted."));
   }
 }

Index: AdbModule.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/AdbModule.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -u -2 -r1.2 -r1.3
--- AdbModule.cpp       8 Sep 2002 19:23:08 -0000       1.2
+++ AdbModule.cpp       12 Sep 2002 02:36:49 -0000      1.3
@@ -70,5 +70,5 @@
       else
       {
-         wxLogDebug("Failed to load ADB importer '%s'.", info->name.c_str());
+         wxLogDebug(_T("Failed to load ADB importer '%s'."), info->name.c_str());
       }
 
@@ -98,5 +98,5 @@
       else
       {
-         wxLogDebug("Failed to load ADB importer '%s'.", info->name.c_str());
+         wxLogDebug(_T("Failed to load ADB importer '%s'."), info->name.c_str());
       }
 
@@ -163,9 +163,9 @@
 AdbModule::AdbModuleInfo *AdbModule::ms_listModules = NULL;
 
-AdbModule::AdbModuleInfo::AdbModuleInfo(const char *name_,
+AdbModule::AdbModuleInfo::AdbModuleInfo(const wxChar *name_,
 #ifndef USE_ADB_MODULES
                                         Constructor ctor,
 #endif // !USE_ADB_MODULES
-                                        const char *desc_)
+                                        const wxChar *desc_)
 {
    // init member vars

Index: ImportPine.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/ImportPine.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -b -u -2 -r1.7 -r1.8
--- ImportPine.cpp      8 Sep 2002 19:23:08 -0000       1.7
+++ ImportPine.cpp      12 Sep 2002 02:36:49 -0000      1.8
@@ -430,5 +430,5 @@
          if ( !address )
          {
-            wxLogDebug("Empty address in the PINE mailing list entry ignored.");
+            wxLogDebug(_T("Empty address in the PINE mailing list entry ignored."));
          }
          else

Index: ImportText.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/ImportText.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -b -u -2 -r1.7 -r1.8
--- ImportText.cpp      8 Sep 2002 19:23:08 -0000       1.7
+++ ImportText.cpp      12 Sep 2002 02:36:49 -0000      1.8
@@ -139,5 +139,5 @@
             // we don't give any message to the user because we don't have
             // enough info to say anything clever here
-            wxLogDebug("AdbTextImporter: unterminated quote.");
+            wxLogDebug(_T("AdbTextImporter: unterminated quote."));
 
             break;

Index: ImportVCard.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/ImportVCard.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -b -u -2 -r1.5 -r1.6
--- ImportVCard.cpp     8 Sep 2002 19:23:08 -0000       1.5
+++ ImportVCard.cpp     12 Sep 2002 02:36:49 -0000      1.6
@@ -147,5 +147,5 @@
             {
                // what else can we do?
-               wxLogDebug("Skipping vCard without name.");
+               wxLogDebug(_T("Skipping vCard without name."));
 
                continue;
@@ -160,5 +160,5 @@
          {
             // TODO: ask to rename it?
-            wxLogDebug("Skipping vCard with duplicate name.");
+            wxLogDebug(_T("Skipping vCard with duplicate name."));
          }
          else

Index: ProvBbdb.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/ProvBbdb.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -b -u -2 -r1.27 -r1.28
--- ProvBbdb.cpp        8 Sep 2002 19:23:08 -0000       1.27
+++ ProvBbdb.cpp        12 Sep 2002 02:36:49 -0000      1.28
@@ -884,5 +884,5 @@
    BbdbEntryList::iterator i;
 
-//   wxLogDebug("BbdbEntryGroup::GetEntry() called with: %s", name.c_str());
+//   wxLogDebug(_T("BbdbEntryGroup::GetEntry() called with: %s"), name.c_str());
    for(i = m_entries->begin(); i != m_entries->end(); i++)
    {
@@ -907,5 +907,5 @@
 {
    MOcheck();
-//   wxLogDebug("BbdbEntryGroup::GetGroup() called with: %s", name.c_str());
+//   wxLogDebug(_T("BbdbEntryGroup::GetGroup() called with: %s"), name.c_str());
    return NULL;
 }
@@ -952,5 +952,5 @@
 {
    MOcheck();
-//   wxLogDebug("BbdbEntryGroup::FindEntry() called with: %s", szName);
+//   wxLogDebug(_T("BbdbEntryGroup::FindEntry() called with: %s"), szName);
    return NULL;
 }



-------------------------------------------------------
In remembrance
www.osdn.com/911/
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to