]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/helphtml.cpp
fix typo in drawing slider ticks; added assert to check for it (slightly modified...
[wxWidgets.git] / src / generic / helphtml.cpp
index 21c1c6f4d432939328a9e2f9ffc304a72accffdf..9f106ae59cae290ab35045120dd283e41466df40 100644 (file)
 
 /// Name for map file.
 #define WXEXTHELP_MAPFILE   _T("wxhelp.map")
-/// Path separator.
-#ifdef __WXMSW__
-#define WXEXTHELP_SEPARATOR _T('\\')
-#else
-#define WXEXTHELP_SEPARATOR _T('/')
-#endif
 /// Maximum line length in map file.
 #define WXEXTHELP_BUFLEN 512
 /// Character introducing comments/documentation field in map file.
@@ -139,7 +133,11 @@ wxHTMLHelpControllerBase::LoadFile(const wxString& ifile)
          wxChar* f = wxGetWorkingDirectory();
          file = f;
          delete[] f; // wxGetWorkingDirectory returns new memory
+#ifdef __WXMAC__
+         file << ifile;
+#else
          file << WXEXTHELP_SEPARATOR << ifile;
+#endif
       }
       else
          file = ifile;
@@ -197,15 +195,15 @@ wxHTMLHelpControllerBase::LoadFile(const wxString& ifile)
             break; // error
          for(i=0; isdigit(buffer[i])||isspace(buffer[i])||buffer[i]=='-'; i++)
             ; // find begin of URL
-         url = "";
+         url = wxT("");
          while(buffer[i] && ! isspace(buffer[i]) && buffer[i] !=
                WXEXTHELP_COMMENTCHAR)
-            url << buffer[i++];
+            url << (wxChar) buffer[i++];
          while(buffer[i] && buffer[i] != WXEXTHELP_COMMENTCHAR)
             i++;
-         doc = "";
+         doc = wxT("");
          if(buffer[i])
-            doc = (buffer + i + 1); // skip the comment character
+            doc = wxString::FromAscii( (buffer + i + 1) ); // skip the comment character
          m_MapList->Append(new wxExtHelpMapEntry(id,url,doc));
          m_NumOfEntries++;
       }
@@ -314,7 +312,7 @@ wxHTMLHelpControllerBase::KeywordSearch(const wxString& k)
             // choices[idx] = (**i).doc.Contains((**i).doc.Before(WXEXTHELP_COMMENTCHAR));
             //if(choices[idx].IsEmpty()) // didn't contain the ';'
             //   choices[idx] = (**i).doc;
-            choices[idx] = "";
+            choices[idx] = wxT("");
             for(j=0;entry->doc.c_str()[j]
                    && entry->doc.c_str()[j] != WXEXTHELP_COMMENTCHAR; j++)
                choices[idx] << entry->doc.c_str()[j];