merge with latest sources
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -16,11 +16,14 @@
|
||||
#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.
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog, wxDialog)
|
||||
IMPLEMENT_CLASS(wxPageSetupDialog, wxDialog)
|
||||
#endif
|
||||
|
||||
wxPrintDialog::wxPrintDialog()
|
||||
{
|
||||
@@ -64,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 ;
|
||||
@@ -84,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 ;
|
||||
}
|
||||
|
||||
@@ -127,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 ;
|
||||
@@ -147,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 ;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user