Remove unnecessary duplicate code dealing with invoking window from wxOSX.
This is roughly the same as r64127 for wxGTK but for wxOSX: don't duplicate the functionality already present in the base class in Mac-specific way. Just use wxMenu::GetWindow() instead of painstakingly propagating invoking window changes via the entire menu hierarchy. Also attach the root menu used in wxOSX to the menu bar to ensure that the correct window can be found for all its menus. Closes #11990. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -41,10 +41,6 @@ public:
|
||||
|
||||
bool ProcessCommand(wxCommandEvent& event);
|
||||
|
||||
// semi-private accessors
|
||||
|
||||
// get the window which contains this menu
|
||||
wxWindow *GetWindow() const;
|
||||
// get the menu handle
|
||||
WXHMENU GetHMenu() const ;
|
||||
|
||||
@@ -155,12 +151,6 @@ public:
|
||||
// attach to a frame
|
||||
void Attach(wxFrame *frame);
|
||||
|
||||
// clear the invoking window for all menus and submenus
|
||||
void UnsetInvokingWindow() ;
|
||||
|
||||
// set the invoking window for all menus and submenus
|
||||
void SetInvokingWindow( wxFrame* frame ) ;
|
||||
|
||||
// if the menubar is modified, the display is not updated automatically,
|
||||
// call this function to update it (m_menuBarFrame should be !NULL)
|
||||
void Refresh(bool eraseBackground = true, const wxRect *rect = NULL);
|
||||
@@ -178,7 +168,6 @@ public:
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
wxWindow *m_invokingWindow;
|
||||
|
||||
wxArrayString m_titles;
|
||||
static bool s_macAutoWindowMenu ;
|
||||
|
Reference in New Issue
Block a user