Fix compilation with wxUSE_ACCEL==0
This commit is contained in:
@@ -312,6 +312,7 @@ bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& va
|
|||||||
|
|
||||||
GetBuffer().AddEventHandler(this);
|
GetBuffer().AddEventHandler(this);
|
||||||
|
|
||||||
|
#if wxUSE_ACCEL
|
||||||
// Accelerators
|
// Accelerators
|
||||||
wxAcceleratorEntry entries[6];
|
wxAcceleratorEntry entries[6];
|
||||||
|
|
||||||
@@ -324,6 +325,7 @@ bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& va
|
|||||||
|
|
||||||
wxAcceleratorTable accel(6, entries);
|
wxAcceleratorTable accel(6, entries);
|
||||||
SetAcceleratorTable(accel);
|
SetAcceleratorTable(accel);
|
||||||
|
#endif // wxUSE_ACCEL
|
||||||
|
|
||||||
m_contextMenu = new wxMenu;
|
m_contextMenu = new wxMenu;
|
||||||
m_contextMenu->Append(wxID_UNDO, _("&Undo"));
|
m_contextMenu->Append(wxID_UNDO, _("&Undo"));
|
||||||
|
@@ -78,7 +78,9 @@ wxObject *wxMenuXmlHandler::DoCreateResource()
|
|||||||
{
|
{
|
||||||
int id = GetID();
|
int id = GetID();
|
||||||
wxString label = GetText(wxT("label"));
|
wxString label = GetText(wxT("label"));
|
||||||
|
#if wxUSE_ACCEL
|
||||||
wxString accel = GetText(wxT("accel"), false);
|
wxString accel = GetText(wxT("accel"), false);
|
||||||
|
#endif // wxUSE_ACCEL
|
||||||
|
|
||||||
wxItemKind kind = wxITEM_NORMAL;
|
wxItemKind kind = wxITEM_NORMAL;
|
||||||
if (GetBool(wxT("radio")))
|
if (GetBool(wxT("radio")))
|
||||||
@@ -99,12 +101,14 @@ wxObject *wxMenuXmlHandler::DoCreateResource()
|
|||||||
|
|
||||||
wxMenuItem *mitem = new wxMenuItem(p_menu, id, label,
|
wxMenuItem *mitem = new wxMenuItem(p_menu, id, label,
|
||||||
GetText(wxT("help")), kind);
|
GetText(wxT("help")), kind);
|
||||||
|
#if wxUSE_ACCEL
|
||||||
if (!accel.empty())
|
if (!accel.empty())
|
||||||
{
|
{
|
||||||
wxAcceleratorEntry entry;
|
wxAcceleratorEntry entry;
|
||||||
if (entry.FromString(accel))
|
if (entry.FromString(accel))
|
||||||
mitem->SetAccel(&entry);
|
mitem->SetAccel(&entry);
|
||||||
}
|
}
|
||||||
|
#endif // wxUSE_ACCEL
|
||||||
|
|
||||||
#if !defined(__WXMSW__) || wxUSE_OWNER_DRAWN
|
#if !defined(__WXMSW__) || wxUSE_OWNER_DRAWN
|
||||||
if (HasParam(wxT("bitmap")))
|
if (HasParam(wxT("bitmap")))
|
||||||
|
Reference in New Issue
Block a user