]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/printdlg.cpp
notify the event loop that synthesized events are on the queue, wait for them to...
[wxWidgets.git] / src / osx / carbon / printdlg.cpp
index fae5551255bd1f796db386566c7941177e71a22a..0729a4770a5887bc1f37e499547b17d8e2d07302 100644 (file)
 #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 +42,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 +77,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 +87,10 @@ int wxMacPageSetupDialog::ShowModal()
     OSErr err = noErr;
     Boolean accepted;
 
+    wxDialog::OSXBeginModalDialog();
     err = PMSessionPageSetupDialog( nativeData->GetPrintSession(), nativeData->GetPageFormat(),
         &accepted );
+    wxDialog::OSXEndModalDialog();
 
     if ((err == noErr) && !accepted)
     {