projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
compilation fix
[wxWidgets.git]
/
src
/
mac
/
printdlg.cpp
diff --git
a/src/mac/printdlg.cpp
b/src/mac/printdlg.cpp
index 51a22db84f81fba3bec0e78d3c125fff67779282..ec13b9745533f2553212d8034d8396b6ebe47442 100644
(file)
--- a/
src/mac/printdlg.cpp
+++ b/
src/mac/printdlg.cpp
@@
-18,6
+18,16
@@
#include "wx/dcprint.h"
#include "wx/msgdlg.h"
#include "wx/mac/uma.h"
#include "wx/dcprint.h"
#include "wx/msgdlg.h"
#include "wx/mac/uma.h"
+#ifndef __DARWIN__
+ #include "Printing.h"
+#endif
+
+#if defined(TARGET_CARBON) && !defined(__DARWIN__)
+# if PM_USE_SESSION_APIS
+# include <PMCore.h>
+# endif
+# include <PMApplication.h>
+#endif
// Use generic page setup dialog: use your own native one if one exists.
// Use generic page setup dialog: use your own native one if one exists.
@@
-61,8
+71,10
@@
bool wxPrintDialog::Create(wxWindow *p, wxPrintDialogData* data)
wxPrintDialog::~wxPrintDialog()
{
wxPrintDialog::~wxPrintDialog()
{
- if (m_destroyDC && m_printerDC)
+ if (m_destroyDC && m_printerDC)
{
delete m_printerDC;
delete m_printerDC;
+ m_printerDC = NULL;
+ }
}
int wxPrintDialog::ShowModal()
}
int wxPrintDialog::ShowModal()
@@
-72,7
+84,7
@@
int wxPrintDialog::ShowModal()
wxString message ;
#if !TARGET_CARBON
wxString message ;
#if !TARGET_CARBON
- err = ::UMAPrOpen() ;
+ err = ::UMAPrOpen(
NULL
) ;
if ( err == noErr )
{
m_printDialogData.ConvertToNative() ;
if ( err == noErr )
{
m_printDialogData.ConvertToNative() ;
@@
-89,7
+101,7
@@
int wxPrintDialog::ShowModal()
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
dialog.ShowModal();
}
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
dialog.ShowModal();
}
- ::UMAPrClose() ;
+ ::UMAPrClose(
NULL
) ;
#else
#if PM_USE_SESSION_APIS
PMPrintSession macPrintSession = kPMNoReference;
#else
#if PM_USE_SESSION_APIS
PMPrintSession macPrintSession = kPMNoReference;
@@
-224,7
+236,7
@@
int wxPageSetupDialog::ShowModal()
wxString message ;
#if !TARGET_CARBON
wxString message ;
#if !TARGET_CARBON
- err = ::UMAPrOpen() ;
+ err = ::UMAPrOpen(
NULL
) ;
if ( err == noErr )
{
m_pageSetupData.ConvertToNative() ;
if ( err == noErr )
{
m_pageSetupData.ConvertToNative() ;
@@
-241,7
+253,7
@@
int wxPageSetupDialog::ShowModal()
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
dialog.ShowModal();
}
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
dialog.ShowModal();
}
- ::UMAPrClose() ;
+ ::UMAPrClose(
NULL
) ;
#else
#if PM_USE_SESSION_APIS
PMPrintSession macPrintSession = kPMNoReference;
#else
#if PM_USE_SESSION_APIS
PMPrintSession macPrintSession = kPMNoReference;