]> git.saurik.com Git - wxWidgets.git/commitdiff
copy item text for app menu items from wx menus
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 8 Feb 2011 10:47:19 +0000 (10:47 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 8 Feb 2011 10:47:19 +0000 (10:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/menu_osx.cpp

index dcdb935fbde0477455612070ceb914121a79e2f7..54b2d6aa917ce85e11ad8ea1ac9a7912b865b223 100644 (file)
@@ -600,16 +600,29 @@ void wxMenuBar::MacInstallMenuBar()
     
     int id = 0;
     wxMenuItem* appleItem = NULL;
+    wxMenuItem* wxItem = NULL;
 
     id = wxApp::s_macAboutMenuItemId;
     appleItem = m_appleMenu->FindItem(id);
+    wxItem = FindItem(id);
     if ( appleItem != NULL )
-        appleItem->GetPeer()->Hide(FindItem(id) == NULL );
+    {
+        if ( wxItem == NULL )
+            appleItem->GetPeer()->Hide();
+        else 
+            appleItem->SetItemLabel(wxItem->GetItemLabel());
+    }
     
     id = wxApp::s_macPreferencesMenuItemId;
     appleItem = m_appleMenu->FindItem(id);
+    wxItem = FindItem(id);
     if ( appleItem != NULL )
-        appleItem->GetPeer()->Hide(FindItem(id) == NULL );
+    {
+        if ( wxItem == NULL )
+            appleItem->GetPeer()->Hide();
+        else 
+            appleItem->SetItemLabel(wxItem->GetItemLabel());
+    }
     
         
 #if 0