Store menus titles in menus themselves in wxOSX.

Get rid of wxMenuBar::m_titles array which doesn't seem to be needed and just
store the titles in the menus themselves instead. This makes wxMenu::GetTitle()
work as in the other ports and fixes unit test failures in menu test.

It also makes it unnecessary to duplicate the base class Find[Menu]Item()
methods in wxOSX wxMenuBar so simply remove them entirely.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-12-19 15:02:45 +00:00
parent 8a1459665d
commit 46405e36bf
2 changed files with 3 additions and 72 deletions

View File

@@ -126,10 +126,6 @@ public:
virtual wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title);
virtual wxMenu *Remove(size_t pos);
virtual int FindMenuItem(const wxString& menuString,
const wxString& itemString) const;
virtual wxMenuItem* FindItem( int id, wxMenu **menu = NULL ) const;
virtual void EnableTop( size_t pos, bool flag );
virtual void SetMenuLabel( size_t pos, const wxString& label );
virtual wxString GetMenuLabel( size_t pos ) const;
@@ -141,7 +137,6 @@ public:
}
// implementation from now on
int FindMenu(const wxString& title);
void Detach();
// returns TRUE if we're attached to a frame
@@ -169,7 +164,6 @@ protected:
// common part of all ctors
void Init();
wxArrayString m_titles;
static bool s_macAutoWindowMenu ;
static WXHMENU s_macWindowMenuHandle ;