]> git.saurik.com Git - wxWidgets.git/commitdiff
Reuse functionality of wxGetStockLabel().
authorWłodzimierz Skiba <abx@abx.art.pl>
Tue, 16 Aug 2005 20:23:04 +0000 (20:23 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Tue, 16 Aug 2005 20:23:04 +0000 (20:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/mdig.cpp
src/msw/mdi.cpp

index b2ad4fd4e2468b82c00eed5341b79de7e5556243..be8d84b8ba869069340afa74d99ae41edf560059 100644 (file)
@@ -35,6 +35,7 @@
 #endif //WX_PRECOMP
 
 #include "wx/generic/mdig.h"
+#include "wx/stockitem.h"
 
 enum MDI_MENU_ID
 {
@@ -307,7 +308,7 @@ void wxGenericMDIParentFrame::AddWindowMenu(wxMenuBar *pMenuBar)
 {
     if (pMenuBar && m_pWindowMenu)
     {
-        int pos = pMenuBar->FindMenu(wxStripMenuCodes(wxString(_("&Help"))));
+        int pos = pMenuBar->FindMenu(wxGetStockLabel(wxID_HELP,false));
         if (pos == wxNOT_FOUND)
         {
             pMenuBar->Append(m_pWindowMenu, _("&Window"));
index dad11b4bcd85680438a95f81a504f2a342536141..44718647dcdf54d69033c723715c5ca9d66ccfdd 100644 (file)
@@ -45,6 +45,7 @@
     #include "wx/log.h"
 #endif
 
+#include "wx/stockitem.h"
 #include "wx/mdi.h"
 #include "wx/msw/private.h"
 
@@ -1401,9 +1402,8 @@ static void InsertWindowMenu(wxWindow *win, WXHMENU menu, HMENU subMenu)
                 continue;
             }
 
-            wxString strHelp(_("&Help"));
             wxString strBuf(buf);
-            if ( wxStripMenuCodes(strBuf) == wxStripMenuCodes(strHelp) )
+            if ( wxStripMenuCodes(strBuf) == wxGetStockLabel(wxID_HELP,false) )
             {
                 success = true;
                 ::InsertMenu(hmenu, i, MF_BYPOSITION | MF_POPUP | MF_STRING,