m_topLevelMenu = (wxMenu*) NULL;
m_ownedByMenuBar = false;
- if ( !!m_title )
+ if ( !m_title.empty() )
{
Append(-3, m_title) ;
AppendSeparator() ;
wxMenuBar::wxMenuBar(size_t n, wxMenu *menus[], const wxArrayString& titles, long WXUNUSED(style))
{
- wxASSERT( size_t(n) == titles.GetCount() );
+ wxASSERT( n == titles.GetCount() );
Init();
m_titles = titles;
- for ( int i = 0; i < n; i++ )
+ for ( size_t i = 0; i < n; i++ )
m_menus.Append(menus[i]);
}
{
Init();
- for ( int i = 0; i < n; i++ )
+ for ( size_t i = 0; i < n; i++ )
{
m_menus.Append(menus[i]);
m_titles.Add(titles[i]);
if (!m_font.Ok() || !m_menuWidget)
return;
- WXFontType fontType = m_font.GetFontType(XtDisplay((Widget) m_menuWidget));
+ Display* dpy = XtDisplay((Widget) m_menuWidget);
XtVaSetValues ((Widget) m_menuWidget,
- wxFont::GetFontTag(), fontType,
+ wxFont::GetFontTag(), m_font.GetFontTypeC(dpy),
NULL);
if (m_buttonWidget)
{
XtVaSetValues ((Widget) m_buttonWidget,
- wxFont::GetFontTag(), fontType,
+ wxFont::GetFontTag(), m_font.GetFontTypeC(dpy),
NULL);
}
if (m_menuWidget && item->GetButtonWidget() && m_font.Ok())
{
XtVaSetValues ((Widget) item->GetButtonWidget(),
- wxFont::GetFontTag(), fontType,
+ wxFont::GetFontTag(), m_font.GetFontTypeC(dpy),
NULL);
}
if (item->GetSubMenu())