X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03647350fc7cd141953c72e0284e928847d30f44..71a09c3579dd5cb4cd8fa7fdc143561cbff74e12:/src/osx/carbon/printdlg.cpp?ds=inline diff --git a/src/osx/carbon/printdlg.cpp b/src/osx/carbon/printdlg.cpp index fae5551255..820f49c6e7 100644 --- a/src/osx/carbon/printdlg.cpp +++ b/src/osx/carbon/printdlg.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id$ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -28,9 +27,12 @@ #include "wx/osx/private/print.h" #include "wx/osx/private.h" #include "wx/statline.h" +#include "wx/modalhook.h" int wxMacPrintDialog::ShowModal() { + WX_HOOK_MODAL_DIALOG(); + m_printDialogData.GetPrintData().ConvertToNative(); ((wxOSXPrintData*)m_printDialogData.GetPrintData().GetNativeData())->TransferFrom( &m_printDialogData ); @@ -39,8 +41,10 @@ int wxMacPrintDialog::ShowModal() OSErr err = noErr; Boolean accepted; wxOSXPrintData* nativeData = (wxOSXPrintData*)m_printDialogData.GetPrintData().GetNativeData(); + wxDialog::OSXBeginModalDialog(); err = PMSessionPrintDialog(nativeData->GetPrintSession(), nativeData->GetPrintSettings(), nativeData->GetPageFormat(), &accepted ); + wxDialog::OSXEndModalDialog(); if ((err == noErr) && !accepted) { @@ -72,6 +76,8 @@ int wxMacPrintDialog::ShowModal() int wxMacPageSetupDialog::ShowModal() { + WX_HOOK_MODAL_DIALOG(); + m_pageSetupData.GetPrintData().ConvertToNative(); wxOSXPrintData* nativeData = (wxOSXPrintData*)m_pageSetupData.GetPrintData().GetNativeData(); nativeData->TransferFrom( &m_pageSetupData ); @@ -80,8 +86,10 @@ int wxMacPageSetupDialog::ShowModal() OSErr err = noErr; Boolean accepted; + wxDialog::OSXBeginModalDialog(); err = PMSessionPageSetupDialog( nativeData->GetPrintSession(), nativeData->GetPageFormat(), &accepted ); + wxDialog::OSXEndModalDialog(); if ((err == noErr) && !accepted) {