make sure it is compilable w/o menus (eg on iPhone)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62831 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2009-12-09 07:27:22 +00:00
parent 9118a24f52
commit 073e104114

View File

@@ -78,7 +78,7 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
kind = wxITEM_CHECK;
}
#if wxUSE_MENUS
// check whether we have dropdown tag inside
wxMenu *menu = NULL; // menu for drop down items
wxXmlNode * const nodeDropdown = GetParamNode("dropdown");
@@ -122,7 +122,7 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
}
}
}
#endif
wxToolBarToolBase * const tool =
m_toolbar->AddTool
(
@@ -137,9 +137,10 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
if ( GetBool(wxT("disabled")) )
m_toolbar->EnableTool(GetID(), false);
#if wxUSE_MENUS
if ( menu )
tool->SetDropdownMenu(menu);
#endif
return m_toolbar; // must return non-NULL
}