]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/utilscmn.cpp
take pixel sizes into account as well when comparing fonts, not just point sizes...
[wxWidgets.git] / src / common / utilscmn.cpp
index 42e5c5cd037c44554a8bb3f55745661d31ce9846..eadd15283b657e9b1260cf8e96d2971780611419 100644 (file)
@@ -96,6 +96,7 @@
 #if defined(__WXMSW__)
     #include "wx/msw/private.h"
     #include "wx/msw/registry.h"
+    #include <shellapi.h> // needed for SHELLEXECUTEINFO
 #endif
 
 #if wxUSE_BASE
@@ -913,15 +914,18 @@ wxRegisterId (long id)
     wxCurrentId = id + 1;
 }
 
-#if wxUSE_MENUS
-
 // ----------------------------------------------------------------------------
 // Menu accelerators related functions
 // ----------------------------------------------------------------------------
 
 wxChar *wxStripMenuCodes(const wxChar *in, wxChar *out)
 {
+#if wxUSE_MENUS
     wxString s = wxMenuItem::GetLabelFromText(in);
+#else
+    wxString str(in);
+    wxString s = wxStripMenuCodes(str);
+#endif // wxUSE_MENUS
     if ( out )
     {
         // go smash their buffer if it's not big enough - I love char * params
@@ -974,8 +978,6 @@ wxString wxStripMenuCodes(const wxString& in)
     return out;
 }
 
-#endif // wxUSE_MENUS
-
 // ----------------------------------------------------------------------------
 // Window search functions
 // ----------------------------------------------------------------------------
@@ -1010,12 +1012,12 @@ int
 wxFindMenuItemId (wxFrame * frame, const wxString& menuString, const wxString& itemString)
 {
 #if wxUSE_MENUS
-  wxMenuBar *menuBar = frame->GetMenuBar ();
-  if ( menuBar )
-      return menuBar->FindMenuItem (menuString, itemString);
+    wxMenuBar *menuBar = frame->GetMenuBar ();
+    if ( menuBar )
+        return menuBar->FindMenuItem (menuString, itemString);
 #endif // wxUSE_MENUS
 
-  return wxNOT_FOUND;
+    return wxNOT_FOUND;
 }
 
 // Try to find the deepest child that contains 'pt'.