X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7112cdd1f3c4730391cf0a562f4d7dcee8676f07..12bb29f5432174ecbd65549bda832d70d34a98ae:/src/generic/msgdlgg.cpp diff --git a/src/generic/msgdlgg.cpp b/src/generic/msgdlgg.cpp index c3dd7a8067..4050fcaee8 100644 --- a/src/generic/msgdlgg.cpp +++ b/src/generic/msgdlgg.cpp @@ -39,6 +39,7 @@ #include "wx/msgdlg.h" #include "wx/artprov.h" #include "wx/textwrapper.h" +#include "wx/modalhook.h" #if wxUSE_STATLINE #include "wx/statline.h" @@ -165,8 +166,6 @@ void wxGenericMessageDialog::DoCreateMsgdialog() { wxDialog::Create(m_parent, wxID_ANY, m_caption, m_pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE); - bool is_pda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA); - wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL ); wxBoxSizer *icon_text = new wxBoxSizer( wxHORIZONTAL ); @@ -181,7 +180,7 @@ void wxGenericMessageDialog::DoCreateMsgdialog() wxID_ANY, wxArtProvider::GetMessageBoxIcon(m_dialogStyle) ); - if (is_pda) + if ( wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA ) topsizer->Add( icon, 0, wxTOP|wxLEFT|wxRIGHT | wxALIGN_LEFT, 10 ); else icon_text->Add(icon, wxSizerFlags().Top().Border(wxRIGHT, 20)); @@ -268,6 +267,8 @@ void wxGenericMessageDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) int wxGenericMessageDialog::ShowModal() { + WX_HOOK_MODAL_DIALOG(); + if ( !m_created ) { m_created = true;