]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/printmac.cpp
refresh had to offset the region by borders
[wxWidgets.git] / src / mac / carbon / printmac.cpp
index 487123bad05789946a2f38482297635d1bf4b00a..a053eb7d805f6401486e0575c8d7c1a59ec0f558 100644 (file)
@@ -144,7 +144,7 @@ void wxMacCarbonPrintData::TransferFrom( wxPrintData* data )
     // collate cannot be set
 #if 0 // not yet tested
     if ( m_printerName.Length() > 0 )
-        PMSessionSetCurrentPrinter( (PMPrintSession) m_macPrintSession , wxMacCFStringHolder( m_printerName ) ) ;
+        PMSessionSetCurrentPrinter( (PMPrintSession) m_macPrintSession , wxMacCFStringHolder( m_printerName , wxFont::GetDefaultEncoding() ) ) ;
 #endif
     PMColorMode color ;
     PMGetColorMode(  (PMPrintSettings) m_macPrintSettings, &color ) ;
@@ -555,7 +555,7 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
         if (dialog.ShowModal() == wxID_OK)
         {
             dc = dialog.GetPrintDC();
-            m_printDialogData = dialog.GetPrintData();
+            m_printDialogData = dialog.GetPrintDialogData();
         }
     }
     else
@@ -648,12 +648,15 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
             }
             else
             {
-// #if !TARGET_CARBON
-                GrafPtr thePort ;
-                GetPort( &thePort ) ;
-                wxSafeYield(win,true);
-                SetPort( thePort ) ;
-// #endif                
+#if TARGET_CARBON
+                if ( UMAGetSystemVersion() >= 0x1000 )
+#endif
+                {
+                    GrafPtr thePort ;
+                    GetPort( &thePort ) ;
+                    wxSafeYield(win,true);
+                    SetPort( thePort ) ;
+                }
                 dc->StartPage();
                 keepGoing = printout->OnPrintPage(pn);
                 dc->EndPage();