X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e75491071dbefcada61175e3eb89ce4edf335983..f1d93f0beeec9d88f8a225aa35a9ccc163dcdb15:/src/mac/printdlg.cpp diff --git a/src/mac/printdlg.cpp b/src/mac/printdlg.cpp index 5f914ddbfd..a5c41e0737 100644 --- a/src/mac/printdlg.cpp +++ b/src/mac/printdlg.cpp @@ -16,6 +16,7 @@ #include "wx/object.h" #include "wx/printdlg.h" #include "wx/dcprint.h" +#include "wx/mac/uma.h" // Use generic page setup dialog: use your own native one if one exists. @@ -66,15 +67,17 @@ wxPrintDialog::~wxPrintDialog() int wxPrintDialog::ShowModal() { int result = wxID_CANCEL ; + #if !TARGET_CARBON + OSErr err ; wxString message ; - ::PrOpen() ; + ::UMAPrOpen() ; err = PrError() ; if ( !err ) { m_printDialogData.ConvertToNative() ; - if ( m_printDialogData.m_macPrintInfo && ::PrJobDialog( m_printDialogData.m_macPrintInfo ) ) + if ( ::PrJobDialog( m_printDialogData.GetPrintData().m_macPrintInfo ) ) { m_printDialogData.ConvertFromNative() ; result = wxID_OK ; @@ -86,8 +89,10 @@ int wxPrintDialog::ShowModal() message.Printf( "Print Error %d", err ) ; wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ; } - ::PrClose() ; - + ::UMAPrClose() ; + #else + #pragma warning "TODO:Printing for carbon" + #endif return result ; } @@ -129,15 +134,17 @@ wxPageSetupDialog::~wxPageSetupDialog() int wxPageSetupDialog::ShowModal() { int result = wxID_CANCEL ; +#if !TARGET_CARBON + OSErr err ; wxString message ; - ::PrOpen() ; + ::UMAPrOpen() ; err = PrError() ; if ( !err ) { m_pageSetupData.ConvertToNative() ; - if ( m_pageSetupData.m_macPageSetupInfo && ::PrStlDialog( m_pageSetupData.m_macPageSetupInfo ) ) + if ( ::PrStlDialog( m_pageSetupData.GetPrintData().m_macPrintInfo ) ) { m_pageSetupData.ConvertFromNative() ; result = wxID_OK ; @@ -149,8 +156,10 @@ int wxPageSetupDialog::ShowModal() message.Printf( "Print Error %d", err ) ; wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ; } - ::PrClose() ; - + ::UMAPrClose() ; +#else +#pragma warning "TODO:printing for carbon" +#endif return result ; }