- if (event.m_keyCode == WXK_ESCAPE)
- {
- // Behaviour changed in 2.0: we'll send a Cancel message
- // to the dialog instead of Close.
- wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
- cancelEvent.SetEventObject( this );
- GetEventHandler()->ProcessEvent(cancelEvent);
-
- return;
- }
- // We didn't process this event.
- event.Skip();
-}
-
-void wxDialog::Iconize(bool WXUNUSED(iconize))
-{
- // mac dialogs cannot be iconized
-}
-
-bool wxDialog::IsIconized() const
-{
- // mac dialogs cannot be iconized
- return FALSE;
-}
-
-void wxDialog::DoSetClientSize(int width, int height)
-{
- wxWindow::DoSetClientSize( width , height ) ;
-}
+ if (( event.m_keyCode == WXK_ESCAPE ||
+ ( event.m_keyCode == '.' && event.MetaDown() ) )
+ && FindWindow(wxID_CANCEL) )
+ {
+ // Behaviour changed in 2.0: we'll send a Cancel message
+ // to the dialog instead of Close.
+ wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
+ cancelEvent.SetEventObject( this );
+ GetEventHandler()->ProcessEvent(cancelEvent);