]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/helphtml.cpp
* prgodlgg.h: Update() use wxString instead of 'char *'
[wxWidgets.git] / src / generic / helphtml.cpp
index 0d909968b3b630336d69677fb74fc00d77cab33a..f2055a19df5e8cc217e5cc557777c98b5daff831 100644 (file)
@@ -33,13 +33,6 @@ public:
       { id = iid; url = iurl; doc = idoc; }
 };
 
-
-struct wxBusyCursor
-{
-   wxBusyCursor() { wxBeginBusyCursor(); }
-   ~wxBusyCursor() { wxEndBusyCursor(); }
-};
-
 IMPLEMENT_ABSTRACT_CLASS(wxHTMLHelpControllerBase, wxHelpControllerBase)
    
 /**
@@ -103,7 +96,7 @@ wxHTMLHelpControllerBase::LoadFile(const wxString& ifile)
       file = ifile;
       if(! wxIsAbsolutePath(file))
       {
-         char* f = wxGetWorkingDirectory();
+         wxChar* f = wxGetWorkingDirectory();
          file = f;
          delete[] f; // wxGetWorkingDirectory returns new memory
          file << WXEXTHELP_SEPARATOR << ifile;
@@ -122,6 +115,15 @@ wxHTMLHelpControllerBase::LoadFile(const wxString& ifile)
          newfile << WXEXTHELP_SEPARATOR << wxGetLocale()->GetName();
          if(wxDirExists(newfile))
             file = newfile;
+         else
+         {
+            newfile = WXEXTHELP_SEPARATOR;
+            const wxChar *cptr = wxGetLocale()->GetName().c_str();
+            while(*cptr && *cptr != _T('_'))
+               newfile << *(cptr++);
+            if(wxDirExists(newfile))
+               file = newfile;
+         }
       }
       
       if(! wxDirExists(file))
@@ -139,7 +141,7 @@ wxHTMLHelpControllerBase::LoadFile(const wxString& ifile)
    m_MapList = new wxList;
    m_NumOfEntries = 0;
    
-   FILE *input = fopen(mapFile.c_str(),"rt");
+   FILE *input = fopen(mapFile.fn_str(),"rt");
    if(! input)
       return FALSE;
    do