]> git.saurik.com Git - wxWidgets.git/commitdiff
Compile fixes
authorJulian Smart <julian@anthemion.co.uk>
Sat, 11 Aug 2007 18:39:49 +0000 (18:39 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sat, 11 Aug 2007 18:39:49 +0000 (18:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/menu.h
samples/menu/menu.cpp
src/common/menucmn.cpp

index 0de4fb3eef4576bf60ca1d3d680fa72e1e255d06..c222caa135b45c37576453cb1fd4068773bb699d 100644 (file)
@@ -512,19 +512,6 @@ protected:
     DECLARE_NO_COPY_CLASS(wxMenuBarBase)
 };
 
-#if WXWIN_COMPATIBILITY_2_8
-// get or change the label of the menu at given position
-void wxMenuBarBase::SetLabelTop(size_t pos, const wxString& label)
-{
-    SetMenuLabel(pos, label);
-}
-
-wxString wxMenuBarBase::GetLabelTop(size_t pos) const
-{
-    return GetMenuLabel(pos);
-}
-#endif
-
 // ----------------------------------------------------------------------------
 // include the real class declaration
 // ----------------------------------------------------------------------------
index a9f4b678373894e3e352843fc2c4c7b970359553..b3d2bf27be703ea2973180681ce17ee6740875e3 100644 (file)
@@ -858,8 +858,9 @@ void MyFrame::OnGetLabelMenuItem(wxCommandEvent& WXUNUSED(event))
 
     if ( item )
     {
+        wxString label = item->GetItemLabel();
         wxLogMessage(_T("The label of the last menu item is '%s'"),
-                     item->GetLabel().c_str());
+                     label.c_str());
     }
 }
 
index 0c85d548ba9230d618f4317c6ee54388d8d82565..fa0bfec3d72499d42a46bdcbe3455099e9decc3a 100644 (file)
@@ -307,7 +307,7 @@ int wxMenuBase::FindItem(const wxString& text) const
         // name just like the ordinary items
         if ( !item->IsSeparator() )
         {
-            if ( item->GetLabel() == label )
+            if ( item->GetItemLabelText() == label )
                 return item->GetId();
         }
     }
@@ -839,4 +839,18 @@ void wxMenuBarBase::UpdateMenus( void )
     }
 }
 
+#if WXWIN_COMPATIBILITY_2_8
+// get or change the label of the menu at given position
+void wxMenuBarBase::SetLabelTop(size_t pos, const wxString& label)
+{
+    SetMenuLabel(pos, label);
+}
+
+wxString wxMenuBarBase::GetLabelTop(size_t pos) const
+{
+    return GetMenuLabel(pos);
+}
+#endif
+
+
 #endif // wxUSE_MENUS