corrected warnings and removed useless extern declaration
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -613,40 +613,38 @@ void wxMenuBar::RebuildAccelTable()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_ACCEL
|
#endif // wxUSE_ACCEL
|
||||||
#ifdef WXMAKINGDLL
|
|
||||||
extern short gCurrentResource ;
|
|
||||||
#endif
|
|
||||||
void wxMenuBar::MacInstallMenuBar()
|
void wxMenuBar::MacInstallMenuBar()
|
||||||
{
|
{
|
||||||
if ( s_macInstalledMenuBar == this )
|
if ( s_macInstalledMenuBar == this )
|
||||||
return ;
|
return ;
|
||||||
|
|
||||||
wxStAppResource resload ;
|
wxStAppResource resload ;
|
||||||
|
|
||||||
Handle menubar = ::GetNewMBar( kwxMacMenuBarResource ) ;
|
Handle menubar = ::GetNewMBar( kwxMacMenuBarResource ) ;
|
||||||
wxString message ;
|
wxString message ;
|
||||||
wxCHECK_RET( menubar != NULL, "can't read MBAR resource" );
|
wxCHECK_RET( menubar != NULL, "can't read MBAR resource" );
|
||||||
::SetMenuBar( menubar ) ;
|
::SetMenuBar( menubar ) ;
|
||||||
#if TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
::DisposeMenuBar( menubar ) ;
|
::DisposeMenuBar( menubar ) ;
|
||||||
#else
|
#else
|
||||||
::DisposeHandle( menubar ) ;
|
::DisposeHandle( menubar ) ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
MenuHandle menu = ::GetMenuHandle( kwxMacAppleMenuId ) ;
|
|
||||||
#if TARGET_API_MAC_OS8
|
#if TARGET_API_MAC_OS8
|
||||||
|
MenuHandle menu = ::GetMenuHandle( kwxMacAppleMenuId ) ;
|
||||||
if ( CountMenuItems( menu ) == 2 )
|
if ( CountMenuItems( menu ) == 2 )
|
||||||
{
|
{
|
||||||
::AppendResMenu(menu, 'DRVR');
|
::AppendResMenu(menu, 'DRVR');
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (int i = 0; i < m_menus.GetCount(); i++)
|
for (size_t i = 0; i < m_menus.GetCount(); i++)
|
||||||
{
|
{
|
||||||
Str255 label;
|
Str255 label;
|
||||||
wxNode *node;
|
wxNode *node;
|
||||||
wxMenuItem *item;
|
wxMenuItem *item;
|
||||||
int pos ;
|
int pos ;
|
||||||
wxMenu* menu = m_menus[i] , *subMenu = NULL ;
|
wxMenu* menu = m_menus[i] , *subMenu = NULL ;
|
||||||
|
|
||||||
if( m_titles[i] == "?" || m_titles[i] == "&?" || m_titles[i] == wxApp::s_macHelpMenuTitleName )
|
if( m_titles[i] == "?" || m_titles[i] == "&?" || m_titles[i] == wxApp::s_macHelpMenuTitleName )
|
||||||
@@ -719,7 +717,7 @@ void wxMenuBar::MacInstallMenuBar()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
::InsertMenu(MAC_WXHMENU(m_menus[i]->GetHMenu()), 0);
|
::InsertMenu(MAC_WXHMENU(m_menus[i]->GetHMenu()), 0);
|
||||||
for ( int i = 0 ; i < submenus.GetCount() ; ++i )
|
for ( size_t i = 0 ; i < submenus.GetCount() ; ++i )
|
||||||
{
|
{
|
||||||
wxMenu* submenu = (wxMenu*) submenus[i] ;
|
wxMenu* submenu = (wxMenu*) submenus[i] ;
|
||||||
wxNode *subnode;
|
wxNode *subnode;
|
||||||
@@ -893,7 +891,7 @@ void wxMenuBar::MacMenuSelect(wxEvtHandler* handler, long when , int macMenuId,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (int i = 0; i < m_menus.GetCount() ; i++)
|
for (size_t i = 0; i < m_menus.GetCount() ; i++)
|
||||||
{
|
{
|
||||||
if ( m_menus[i]->MacGetMenuId() == macMenuId || ( macMenuId == kHMHelpMenuID && ( m_titles[i] == "?" || m_titles[i] == "&?" || m_titles[i] == wxApp::s_macHelpMenuTitleName ) ) )
|
if ( m_menus[i]->MacGetMenuId() == macMenuId || ( macMenuId == kHMHelpMenuID && ( m_titles[i] == "?" || m_titles[i] == "&?" || m_titles[i] == wxApp::s_macHelpMenuTitleName ) ) )
|
||||||
{
|
{
|
||||||
@@ -907,7 +905,7 @@ void wxMenuBar::MacMenuSelect(wxEvtHandler* handler, long when , int macMenuId,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < m_menus.GetCount(); i++)
|
for (size_t i = 0; i < m_menus.GetCount(); i++)
|
||||||
{
|
{
|
||||||
if ( m_menus[i]->MacMenuSelect( handler , when , macMenuId , macMenuItemNum ) )
|
if ( m_menus[i]->MacMenuSelect( handler , when , macMenuId , macMenuItemNum ) )
|
||||||
{
|
{
|
||||||
|
@@ -613,40 +613,38 @@ void wxMenuBar::RebuildAccelTable()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_ACCEL
|
#endif // wxUSE_ACCEL
|
||||||
#ifdef WXMAKINGDLL
|
|
||||||
extern short gCurrentResource ;
|
|
||||||
#endif
|
|
||||||
void wxMenuBar::MacInstallMenuBar()
|
void wxMenuBar::MacInstallMenuBar()
|
||||||
{
|
{
|
||||||
if ( s_macInstalledMenuBar == this )
|
if ( s_macInstalledMenuBar == this )
|
||||||
return ;
|
return ;
|
||||||
|
|
||||||
wxStAppResource resload ;
|
wxStAppResource resload ;
|
||||||
|
|
||||||
Handle menubar = ::GetNewMBar( kwxMacMenuBarResource ) ;
|
Handle menubar = ::GetNewMBar( kwxMacMenuBarResource ) ;
|
||||||
wxString message ;
|
wxString message ;
|
||||||
wxCHECK_RET( menubar != NULL, "can't read MBAR resource" );
|
wxCHECK_RET( menubar != NULL, "can't read MBAR resource" );
|
||||||
::SetMenuBar( menubar ) ;
|
::SetMenuBar( menubar ) ;
|
||||||
#if TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
::DisposeMenuBar( menubar ) ;
|
::DisposeMenuBar( menubar ) ;
|
||||||
#else
|
#else
|
||||||
::DisposeHandle( menubar ) ;
|
::DisposeHandle( menubar ) ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
MenuHandle menu = ::GetMenuHandle( kwxMacAppleMenuId ) ;
|
|
||||||
#if TARGET_API_MAC_OS8
|
#if TARGET_API_MAC_OS8
|
||||||
|
MenuHandle menu = ::GetMenuHandle( kwxMacAppleMenuId ) ;
|
||||||
if ( CountMenuItems( menu ) == 2 )
|
if ( CountMenuItems( menu ) == 2 )
|
||||||
{
|
{
|
||||||
::AppendResMenu(menu, 'DRVR');
|
::AppendResMenu(menu, 'DRVR');
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (int i = 0; i < m_menus.GetCount(); i++)
|
for (size_t i = 0; i < m_menus.GetCount(); i++)
|
||||||
{
|
{
|
||||||
Str255 label;
|
Str255 label;
|
||||||
wxNode *node;
|
wxNode *node;
|
||||||
wxMenuItem *item;
|
wxMenuItem *item;
|
||||||
int pos ;
|
int pos ;
|
||||||
wxMenu* menu = m_menus[i] , *subMenu = NULL ;
|
wxMenu* menu = m_menus[i] , *subMenu = NULL ;
|
||||||
|
|
||||||
if( m_titles[i] == "?" || m_titles[i] == "&?" || m_titles[i] == wxApp::s_macHelpMenuTitleName )
|
if( m_titles[i] == "?" || m_titles[i] == "&?" || m_titles[i] == wxApp::s_macHelpMenuTitleName )
|
||||||
@@ -719,7 +717,7 @@ void wxMenuBar::MacInstallMenuBar()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
::InsertMenu(MAC_WXHMENU(m_menus[i]->GetHMenu()), 0);
|
::InsertMenu(MAC_WXHMENU(m_menus[i]->GetHMenu()), 0);
|
||||||
for ( int i = 0 ; i < submenus.GetCount() ; ++i )
|
for ( size_t i = 0 ; i < submenus.GetCount() ; ++i )
|
||||||
{
|
{
|
||||||
wxMenu* submenu = (wxMenu*) submenus[i] ;
|
wxMenu* submenu = (wxMenu*) submenus[i] ;
|
||||||
wxNode *subnode;
|
wxNode *subnode;
|
||||||
@@ -893,7 +891,7 @@ void wxMenuBar::MacMenuSelect(wxEvtHandler* handler, long when , int macMenuId,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (int i = 0; i < m_menus.GetCount() ; i++)
|
for (size_t i = 0; i < m_menus.GetCount() ; i++)
|
||||||
{
|
{
|
||||||
if ( m_menus[i]->MacGetMenuId() == macMenuId || ( macMenuId == kHMHelpMenuID && ( m_titles[i] == "?" || m_titles[i] == "&?" || m_titles[i] == wxApp::s_macHelpMenuTitleName ) ) )
|
if ( m_menus[i]->MacGetMenuId() == macMenuId || ( macMenuId == kHMHelpMenuID && ( m_titles[i] == "?" || m_titles[i] == "&?" || m_titles[i] == wxApp::s_macHelpMenuTitleName ) ) )
|
||||||
{
|
{
|
||||||
@@ -907,7 +905,7 @@ void wxMenuBar::MacMenuSelect(wxEvtHandler* handler, long when , int macMenuId,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < m_menus.GetCount(); i++)
|
for (size_t i = 0; i < m_menus.GetCount(); i++)
|
||||||
{
|
{
|
||||||
if ( m_menus[i]->MacMenuSelect( handler , when , macMenuId , macMenuItemNum ) )
|
if ( m_menus[i]->MacMenuSelect( handler , when , macMenuId , macMenuItemNum ) )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user