]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/utilscmn.cpp
toplevel code transferred to wxTopLevelWindow
[wxWidgets.git] / src / common / utilscmn.cpp
index 9d0d3b771cfd085d9ac4bd5237915583d2ba2d9b..a5e42a0eb1048b756a77ccd791b3b80cd32f924d 100644 (file)
@@ -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