removed unused variable

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25822 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-02-15 16:56:15 +00:00
parent 13dd924a3f
commit eeacbb8c4f
2 changed files with 18 additions and 22 deletions

View File

@@ -58,13 +58,13 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
const wxString& name) const wxString& name)
{ {
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) ) if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) )
return FALSE; return FALSE;
MacCreateRealWindow( title , pos , size , MacRemoveBordersFromStyle(style) & ~(wxYES|wxOK|wxNO|wxCANCEL) , name ) ; MacCreateRealWindow( title , pos , size , MacRemoveBordersFromStyle(style) & ~(wxYES|wxOK|wxNO|wxCANCEL) , name ) ;
m_macWindowBackgroundTheme = kThemeBrushDialogBackgroundActive ; m_macWindowBackgroundTheme = kThemeBrushDialogBackgroundActive ;
SetThemeWindowBackground( (WindowRef) m_macWindow , m_macWindowBackgroundTheme , false ) ; SetThemeWindowBackground( (WindowRef) m_macWindow , m_macWindowBackgroundTheme , false ) ;
@@ -76,7 +76,7 @@ void wxDialog::SetModal(bool flag)
if ( flag ) if ( flag )
{ {
m_windowStyle |= wxDIALOG_MODAL; m_windowStyle |= wxDIALOG_MODAL;
wxModelessWindows.DeleteObject(this); wxModelessWindows.DeleteObject(this);
#if TARGET_CARBON #if TARGET_CARBON
SetWindowModality( (WindowRef) MacGetWindowRef() , kWindowModalityAppModal , NULL ) ; SetWindowModality( (WindowRef) MacGetWindowRef() , kWindowModalityAppModal , NULL ) ;
@@ -85,7 +85,7 @@ void wxDialog::SetModal(bool flag)
else else
{ {
m_windowStyle &= ~wxDIALOG_MODAL; m_windowStyle &= ~wxDIALOG_MODAL;
wxModelessWindows.Append(this); wxModelessWindows.Append(this);
} }
} }
@@ -99,7 +99,7 @@ wxDialog::~wxDialog()
// By default, pressing escape cancels the dialog , on mac command-stop does the same thing // By default, pressing escape cancels the dialog , on mac command-stop does the same thing
void wxDialog::OnCharHook(wxKeyEvent& event) void wxDialog::OnCharHook(wxKeyEvent& event)
{ {
if (( event.m_keyCode == WXK_ESCAPE || if (( event.m_keyCode == WXK_ESCAPE ||
( event.m_keyCode == '.' && event.MetaDown() ) ) ( event.m_keyCode == '.' && event.MetaDown() ) )
&& FindWindow(wxID_CANCEL) ) && FindWindow(wxID_CANCEL) )
{ {
@@ -108,7 +108,7 @@ void wxDialog::OnCharHook(wxKeyEvent& event)
wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL); wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
cancelEvent.SetEventObject( this ); cancelEvent.SetEventObject( this );
GetEventHandler()->ProcessEvent(cancelEvent); GetEventHandler()->ProcessEvent(cancelEvent);
return; return;
} }
// We didn't process this event. // We didn't process this event.
@@ -167,8 +167,6 @@ void wxDialog::DoShowModal()
wxModalDialogs.Append(this); wxModalDialogs.Append(this);
wxWindow *parent = GetParent();
#if TARGET_CARBON #if TARGET_CARBON
BeginAppModalStateForWindow( (WindowRef) MacGetWindowRef()) ; BeginAppModalStateForWindow( (WindowRef) MacGetWindowRef()) ;
#else #else
@@ -181,7 +179,7 @@ void wxDialog::DoShowModal()
wxTheApp->MacDoOneEvent() ; wxTheApp->MacDoOneEvent() ;
// calls process idle itself // calls process idle itself
} }
#if TARGET_CARBON #if TARGET_CARBON
EndAppModalStateForWindow( (WindowRef) MacGetWindowRef() ) ; EndAppModalStateForWindow( (WindowRef) MacGetWindowRef() ) ;
#else #else

View File

@@ -58,13 +58,13 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
const wxString& name) const wxString& name)
{ {
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) ) if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) )
return FALSE; return FALSE;
MacCreateRealWindow( title , pos , size , MacRemoveBordersFromStyle(style) & ~(wxYES|wxOK|wxNO|wxCANCEL) , name ) ; MacCreateRealWindow( title , pos , size , MacRemoveBordersFromStyle(style) & ~(wxYES|wxOK|wxNO|wxCANCEL) , name ) ;
m_macWindowBackgroundTheme = kThemeBrushDialogBackgroundActive ; m_macWindowBackgroundTheme = kThemeBrushDialogBackgroundActive ;
SetThemeWindowBackground( (WindowRef) m_macWindow , m_macWindowBackgroundTheme , false ) ; SetThemeWindowBackground( (WindowRef) m_macWindow , m_macWindowBackgroundTheme , false ) ;
@@ -76,7 +76,7 @@ void wxDialog::SetModal(bool flag)
if ( flag ) if ( flag )
{ {
m_windowStyle |= wxDIALOG_MODAL; m_windowStyle |= wxDIALOG_MODAL;
wxModelessWindows.DeleteObject(this); wxModelessWindows.DeleteObject(this);
#if TARGET_CARBON #if TARGET_CARBON
SetWindowModality( (WindowRef) MacGetWindowRef() , kWindowModalityAppModal , NULL ) ; SetWindowModality( (WindowRef) MacGetWindowRef() , kWindowModalityAppModal , NULL ) ;
@@ -85,7 +85,7 @@ void wxDialog::SetModal(bool flag)
else else
{ {
m_windowStyle &= ~wxDIALOG_MODAL; m_windowStyle &= ~wxDIALOG_MODAL;
wxModelessWindows.Append(this); wxModelessWindows.Append(this);
} }
} }
@@ -99,7 +99,7 @@ wxDialog::~wxDialog()
// By default, pressing escape cancels the dialog , on mac command-stop does the same thing // By default, pressing escape cancels the dialog , on mac command-stop does the same thing
void wxDialog::OnCharHook(wxKeyEvent& event) void wxDialog::OnCharHook(wxKeyEvent& event)
{ {
if (( event.m_keyCode == WXK_ESCAPE || if (( event.m_keyCode == WXK_ESCAPE ||
( event.m_keyCode == '.' && event.MetaDown() ) ) ( event.m_keyCode == '.' && event.MetaDown() ) )
&& FindWindow(wxID_CANCEL) ) && FindWindow(wxID_CANCEL) )
{ {
@@ -108,7 +108,7 @@ void wxDialog::OnCharHook(wxKeyEvent& event)
wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL); wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
cancelEvent.SetEventObject( this ); cancelEvent.SetEventObject( this );
GetEventHandler()->ProcessEvent(cancelEvent); GetEventHandler()->ProcessEvent(cancelEvent);
return; return;
} }
// We didn't process this event. // We didn't process this event.
@@ -167,8 +167,6 @@ void wxDialog::DoShowModal()
wxModalDialogs.Append(this); wxModalDialogs.Append(this);
wxWindow *parent = GetParent();
#if TARGET_CARBON #if TARGET_CARBON
BeginAppModalStateForWindow( (WindowRef) MacGetWindowRef()) ; BeginAppModalStateForWindow( (WindowRef) MacGetWindowRef()) ;
#else #else
@@ -181,7 +179,7 @@ void wxDialog::DoShowModal()
wxTheApp->MacDoOneEvent() ; wxTheApp->MacDoOneEvent() ;
// calls process idle itself // calls process idle itself
} }
#if TARGET_CARBON #if TARGET_CARBON
EndAppModalStateForWindow( (WindowRef) MacGetWindowRef() ) ; EndAppModalStateForWindow( (WindowRef) MacGetWindowRef() ) ;
#else #else