summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c0c133e)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58758
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
static wxMenuBar* s_macCommonMenuBar ;
wxMenu* m_rootMenu;
static wxMenuBar* s_macCommonMenuBar ;
wxMenu* m_rootMenu;
DECLARE_DYNAMIC_CLASS(wxMenuBar)
};
DECLARE_DYNAMIC_CLASS(wxMenuBar)
};
m_menuBarFrame = NULL;
m_invokingWindow = NULL;
m_rootMenu = new wxMenu();
m_menuBarFrame = NULL;
m_invokingWindow = NULL;
m_rootMenu = new wxMenu();
- wxMenu* applemenu = new wxMenu();
- applemenu->SetAllowRearrange(false);
- applemenu->Append( wxApp::s_macAboutMenuItemId, "About..." );
- applemenu->AppendSeparator();
- applemenu->Append( wxApp::s_macPreferencesMenuItemId, "Preferences..." );
- applemenu->AppendSeparator();
-
-#if ! wxOSX_USE_CARBON
- applemenu->Append( wxApp::s_macExitMenuItemId, "Quit\tCtrl+Q" );
+ m_appleMenu = new wxMenu();
+ m_appleMenu->SetAllowRearrange(false);
+ m_appleMenu->Append( wxApp::s_macAboutMenuItemId, "About..." );
+ m_appleMenu->AppendSeparator();
+#if !wxOSX_USE_CARBON
+ m_appleMenu->Append( wxApp::s_macPreferencesMenuItemId, "Preferences..." );
+ m_appleMenu->AppendSeparator();
+ m_appleMenu->Append( wxApp::s_macExitMenuItemId, "Quit\tCtrl+Q" );
- m_rootMenu->AppendSubMenu(applemenu, "\x14") ;
+ m_rootMenu->AppendSubMenu(m_appleMenu, "\x14") ;
return ;
m_rootMenu->GetPeer()->MakeRoot();
return ;
m_rootMenu->GetPeer()->MakeRoot();
+ // DisableMenuCommand( NULL , kHICommandPreferences ) ;
#if 0
MenuBarHandle menubar = NULL ;
#if 0
MenuBarHandle menubar = NULL ;
void wxMenuBar::UnsetInvokingWindow()
{
m_invokingWindow = NULL;
void wxMenuBar::UnsetInvokingWindow()
{
m_invokingWindow = NULL;
+ wxMenubarUnsetInvokingWindow(m_appleMenu);
+
wxMenu *menu;
wxMenuList::compatibility_iterator node = m_menus.GetFirst();
wxMenu *menu;
wxMenuList::compatibility_iterator node = m_menus.GetFirst();
void wxMenuBar::SetInvokingWindow(wxFrame *frame)
{
m_invokingWindow = frame;
void wxMenuBar::SetInvokingWindow(wxFrame *frame)
{
m_invokingWindow = frame;
+ wxMenubarSetInvokingWindow(m_appleMenu, frame);
+
wxMenu *menu;
wxMenuList::compatibility_iterator node = m_menus.GetFirst();
wxMenu *menu;
wxMenuList::compatibility_iterator node = m_menus.GetFirst();
}
wxAcceleratorEntry *entry = wxAcceleratorEntry::Create( m_text ) ;
}
wxAcceleratorEntry *entry = wxAcceleratorEntry::Create( m_text ) ;
- m_peer = wxMenuItemImpl::Create( this, pParentMenu, id, text, entry, strHelp, kind, pSubMenu );
+ // use accessors for ID and Kind because they might have been changed in the base constructor
+ m_peer = wxMenuItemImpl::Create( this, pParentMenu, GetId(), text, entry, strHelp, GetKind(), pSubMenu );