X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e158da36bd19d0859baa603c911bc065108d0a79..64ea838d8f4d1853b7d850db93ee565e901d099a:/src/osx/cocoa/printdlg.mm diff --git a/src/osx/cocoa/printdlg.mm b/src/osx/cocoa/printdlg.mm index b2c577e015..1a66fe8761 100644 --- a/src/osx/cocoa/printdlg.mm +++ b/src/osx/cocoa/printdlg.mm @@ -1,10 +1,10 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/osx/carbon/printdlg.cpp +// Name: src/osx/cocoa/printdlg.mm // Purpose: wxPrintDialog, wxPageSetupDialog // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: printdlg.cpp 55419 2008-09-02 16:53:23Z SC $ +// RCS-ID: $Id$ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -33,10 +33,10 @@ IMPLEMENT_CLASS(wxOSXCocoaPrintData, wxOSXPrintData) wxOSXCocoaPrintData::wxOSXCocoaPrintData() { m_macPrintInfo = [[NSPrintInfo alloc] init]; - // TODO add 10.4 code m_macPageFormat = (PMPageFormat) [m_macPrintInfo PMPageFormat]; m_macPrintSettings = (PMPrintSettings) [m_macPrintInfo PMPrintSettings]; m_macPrintSession = (PMPrintSession) [m_macPrintInfo PMPrintSession] ; + PMGetPageFormatPaper(m_macPageFormat, &m_macPaper); } wxOSXCocoaPrintData::~wxOSXCocoaPrintData() @@ -46,14 +46,12 @@ wxOSXCocoaPrintData::~wxOSXCocoaPrintData() void wxOSXCocoaPrintData::UpdateFromPMState() { - // TODO add 10.4 code [m_macPrintInfo updateFromPMPageFormat]; [m_macPrintInfo updateFromPMPrintSettings]; } void wxOSXCocoaPrintData::UpdateToPMState() { - // TODO add 10.4 code m_macPageFormat = (PMPageFormat) [m_macPrintInfo PMPageFormat]; m_macPrintSettings = (PMPrintSettings) [m_macPrintInfo PMPrintSettings]; m_macPrintSession = (PMPrintSession) [m_macPrintInfo PMPrintSession] ; @@ -64,10 +62,10 @@ int wxMacPrintDialog::ShowModal() m_printDialogData.GetPrintData().ConvertToNative(); int result = wxID_CANCEL; - + NSPrintPanel* panel = [NSPrintPanel printPanel]; NSPrintInfo* printInfo = ((wxOSXCocoaPrintData*)m_printDialogData.GetPrintData().GetNativeData())->GetNSPrintInfo(); - if ( [panel runModalWithPrintInfo:printInfo] == NSOKButton ) + if ( (NSInteger)[panel runModalWithPrintInfo:printInfo] == NSOKButton ) { result = wxID_OK; m_printDialogData.GetPrintData().ConvertFromNative(); @@ -92,7 +90,7 @@ int wxMacPageSetupDialog::ShowModal() m_pageSetupData.GetPrintData().ConvertFromNative(); m_pageSetupData.SetPaperSize( m_pageSetupData.GetPrintData().GetPaperSize() ); } - + return result; }