X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f089d73634361c73ff2e3075f8b3924229b44454..be85a191e19ad0e702f4244d424fe7dd066a8f0c:/src/gtk/menu.cpp diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index 8c6cf5ea49..83bece8ee6 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -416,6 +416,15 @@ void wxMenuBar::EnableTop( size_t pos, bool flag ) gtk_widget_set_sensitive( menu->m_owner, flag ); } +bool wxMenuBar::IsEnabledTop(size_t pos) const +{ + wxMenuList::compatibility_iterator node = m_menus.Item( pos ); + wxCHECK_MSG( node, false, wxS("invalid index in IsEnabledTop") ); + wxMenu* const menu = node->GetData(); + wxCHECK_MSG( menu->m_owner, true, wxS("no menu owner?") ); + return gtk_widget_get_sensitive( menu->m_owner ); +} + wxString wxMenuBar::GetMenuLabel( size_t pos ) const { wxMenuList::compatibility_iterator node = m_menus.Item( pos );