// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "dialog.h"
-#endif
-
#include "wx/wxprec.h"
#include "wx/dialog.h"
// All dialogs should really have this style
style |= wxTAB_TRAVERSAL;
- if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style & ~(wxYES|wxOK|wxNO|wxCANCEL) , name) )
+ if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style & ~(wxYES|wxOK|wxNO /*|wxCANCEL*/) , name) )
return FALSE;
return TRUE;
Show(FALSE);
}
-// 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)
{
if (( event.m_keyCode == WXK_ESCAPE ||
bool wxDialog::IsModal() const
{
- return m_isModalStyle;
+ return wxModalDialogs.Find((wxDialog *)this) != NULL; // const_cast
+ // return m_isModalStyle;
}
InitDialog();
}
- if ( IsModal() )
+ if ( m_isModalStyle )
{
if ( show )
{
// Replacement for Show(TRUE) for modal dialogs - returns return code
int wxDialog::ShowModal()
{
- if ( !IsModal() )
+ if ( !m_isModalStyle )
{
SetModal(TRUE);
}
// dialogs and should work for both of them
void wxDialog::EndModal(int retCode)
{
- SetReturnCode(retCode);
- Show(FALSE);
+ SetReturnCode(retCode);
+ Show(FALSE);
+ SetModal(false);
}
// Standard buttons