From eeacbb8c4ff812199e509b36329d1bb237f770a1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 15 Feb 2004 16:56:15 +0000 Subject: [PATCH] removed unused variable git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25822 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/dialog.cpp | 20 +++++++++----------- src/mac/dialog.cpp | 20 +++++++++----------- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/src/mac/carbon/dialog.cpp b/src/mac/carbon/dialog.cpp index 581c50198f..f29ed3e59e 100644 --- a/src/mac/carbon/dialog.cpp +++ b/src/mac/carbon/dialog.cpp @@ -58,13 +58,13 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id, const wxString& name) { SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); - - + + if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) ) return FALSE; - + MacCreateRealWindow( title , pos , size , MacRemoveBordersFromStyle(style) & ~(wxYES|wxOK|wxNO|wxCANCEL) , name ) ; - + m_macWindowBackgroundTheme = kThemeBrushDialogBackgroundActive ; SetThemeWindowBackground( (WindowRef) m_macWindow , m_macWindowBackgroundTheme , false ) ; @@ -76,7 +76,7 @@ void wxDialog::SetModal(bool flag) if ( flag ) { m_windowStyle |= wxDIALOG_MODAL; - + wxModelessWindows.DeleteObject(this); #if TARGET_CARBON SetWindowModality( (WindowRef) MacGetWindowRef() , kWindowModalityAppModal , NULL ) ; @@ -85,7 +85,7 @@ void wxDialog::SetModal(bool flag) else { m_windowStyle &= ~wxDIALOG_MODAL; - + wxModelessWindows.Append(this); } } @@ -99,7 +99,7 @@ wxDialog::~wxDialog() // By default, pressing escape cancels the dialog , on mac command-stop does the same thing void wxDialog::OnCharHook(wxKeyEvent& event) { - if (( event.m_keyCode == WXK_ESCAPE || + if (( event.m_keyCode == WXK_ESCAPE || ( event.m_keyCode == '.' && event.MetaDown() ) ) && FindWindow(wxID_CANCEL) ) { @@ -108,7 +108,7 @@ void wxDialog::OnCharHook(wxKeyEvent& event) wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL); cancelEvent.SetEventObject( this ); GetEventHandler()->ProcessEvent(cancelEvent); - + return; } // We didn't process this event. @@ -167,8 +167,6 @@ void wxDialog::DoShowModal() wxModalDialogs.Append(this); - wxWindow *parent = GetParent(); - #if TARGET_CARBON BeginAppModalStateForWindow( (WindowRef) MacGetWindowRef()) ; #else @@ -181,7 +179,7 @@ void wxDialog::DoShowModal() wxTheApp->MacDoOneEvent() ; // calls process idle itself } - + #if TARGET_CARBON EndAppModalStateForWindow( (WindowRef) MacGetWindowRef() ) ; #else diff --git a/src/mac/dialog.cpp b/src/mac/dialog.cpp index 581c50198f..f29ed3e59e 100644 --- a/src/mac/dialog.cpp +++ b/src/mac/dialog.cpp @@ -58,13 +58,13 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id, const wxString& name) { SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); - - + + if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) ) return FALSE; - + MacCreateRealWindow( title , pos , size , MacRemoveBordersFromStyle(style) & ~(wxYES|wxOK|wxNO|wxCANCEL) , name ) ; - + m_macWindowBackgroundTheme = kThemeBrushDialogBackgroundActive ; SetThemeWindowBackground( (WindowRef) m_macWindow , m_macWindowBackgroundTheme , false ) ; @@ -76,7 +76,7 @@ void wxDialog::SetModal(bool flag) if ( flag ) { m_windowStyle |= wxDIALOG_MODAL; - + wxModelessWindows.DeleteObject(this); #if TARGET_CARBON SetWindowModality( (WindowRef) MacGetWindowRef() , kWindowModalityAppModal , NULL ) ; @@ -85,7 +85,7 @@ void wxDialog::SetModal(bool flag) else { m_windowStyle &= ~wxDIALOG_MODAL; - + wxModelessWindows.Append(this); } } @@ -99,7 +99,7 @@ wxDialog::~wxDialog() // By default, pressing escape cancels the dialog , on mac command-stop does the same thing void wxDialog::OnCharHook(wxKeyEvent& event) { - if (( event.m_keyCode == WXK_ESCAPE || + if (( event.m_keyCode == WXK_ESCAPE || ( event.m_keyCode == '.' && event.MetaDown() ) ) && FindWindow(wxID_CANCEL) ) { @@ -108,7 +108,7 @@ void wxDialog::OnCharHook(wxKeyEvent& event) wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL); cancelEvent.SetEventObject( this ); GetEventHandler()->ProcessEvent(cancelEvent); - + return; } // We didn't process this event. @@ -167,8 +167,6 @@ void wxDialog::DoShowModal() wxModalDialogs.Append(this); - wxWindow *parent = GetParent(); - #if TARGET_CARBON BeginAppModalStateForWindow( (WindowRef) MacGetWindowRef()) ; #else @@ -181,7 +179,7 @@ void wxDialog::DoShowModal() wxTheApp->MacDoOneEvent() ; // calls process idle itself } - + #if TARGET_CARBON EndAppModalStateForWindow( (WindowRef) MacGetWindowRef() ) ; #else -- 2.45.2