From: Vadim Zeitlin Date: Tue, 19 Jan 1999 13:18:51 +0000 (+0000) Subject: compilation fixes for "nocompatibility" mode X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c75e66953f7e46b9a488fd5a4aa1ec726621b13f compilation fixes for "nocompatibility" mode git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/motif/dialog.cpp b/src/motif/dialog.cpp index 95be844612..3aad3f823b 100644 --- a/src/motif/dialog.cpp +++ b/src/motif/dialog.cpp @@ -686,7 +686,7 @@ static void wxDialogBoxEventHandler (Widget wid, // if this returns TRUE, set continueToDispatch to False // (don't continue processing). // Otherwise set it to True and call OnChar. - wxKeyEvent keyEvent(wxEVENT_TYPE_CHAR); + wxKeyEvent keyEvent(wxEVT_CHAR); if (wxTranslateKeyEvent(keyEvent, dialog, wid, event)) { keyEvent.SetEventObject(dialog); diff --git a/src/motif/frame.cpp b/src/motif/frame.cpp index db685c5cf1..6f126aae72 100644 --- a/src/motif/frame.cpp +++ b/src/motif/frame.cpp @@ -844,23 +844,23 @@ void wxFrame::Command(int id) void wxFrame::ProcessCommand(int id) { - wxCommandEvent commandEvent(wxEVENT_TYPE_MENU_COMMAND, id); - commandEvent.SetInt( id ); - commandEvent.SetEventObject( this ); - - wxMenuBar *bar = GetMenuBar() ; - if (!bar) - return; - - /* TODO: check the menu item if required - wxMenuItem *item = bar->FindItemForId(id) ; - if (item && item->IsCheckable()) - { - bar->Check(id,!bar->Checked(id)) ; - } - */ - - GetEventHandler()->ProcessEvent(commandEvent); + wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, id); + commandEvent.SetInt( id ); + commandEvent.SetEventObject( this ); + + wxMenuBar *bar = GetMenuBar() ; + if (!bar) + return; + +/* TODO: check the menu item if required + wxMenuItem *item = bar->FindItemForId(id) ; + if (item && item->IsCheckable()) + { + bar->Check(id,!bar->Checked(id)) ; + } +*/ + + GetEventHandler()->ProcessEvent(commandEvent); } // Checks if there is a toolbar, and returns the first free client position