X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bc87fd68e39395dc3e8beb17cf8af7b38b903322..88594d02eb59a55ac85d3210a49d02918124617b:/src/common/utilscmn.cpp?ds=sidebyside diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index 9d0d3b771c..a5e42a0eb1 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -217,6 +217,11 @@ extern "C" #define strncasecmp strnicmp #endif +#ifdef __WATCOMC__ +#define strcasecmp stricmp +#define strncasecmp strnicmp +#endif + wxChar * copystring (const wxChar *s) { @@ -606,6 +611,7 @@ wxWindow* wxFindWindowAtPoint(wxWindow* win, const wxPoint& pt) // Hack for wxNotebook case: at least in wxGTK, all pages // claim to be shown, so we must only deal with the selected one. +#if wxUSE_NOTEBOOK if (win->IsKindOf(CLASSINFO(wxNotebook))) { wxNotebook* nb = (wxNotebook*) win; @@ -618,6 +624,8 @@ wxWindow* wxFindWindowAtPoint(wxWindow* win, const wxPoint& pt) return foundWin; } } +#endif + /* Doesn't work // Frame case else if (win->IsKindOf(CLASSINFO(wxFrame))) @@ -739,7 +747,7 @@ whereami(name) t = imagedir; if (!absolute_pathname(name)) { -#if defined(DOS) || defined(__WIN32__) +#if defined(__DOS__) || defined(__WIN32__) int drive; char *newrbuf; @@ -1087,6 +1095,18 @@ const wxChar *wxGetInstallPrefix() #endif } +wxString wxGetDataDir() +{ + wxString format = wxGetInstallPrefix(); + format << wxFILE_SEP_PATH + << wxT("share") << wxFILE_SEP_PATH + << wxT("wx") << wxFILE_SEP_PATH + << wxT("%i.%i"); + wxString dir; + dir.Printf(format.c_str(), wxMAJOR_VERSION, wxMINOR_VERSION); + return dir; +} + // ---------------------------------------------------------------------------- // network and user id functions