X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/87138c520ce5dc4d0268191074866e8bc300c984..5ea105e0ba20c15e4d83f829e1c4faeb0a4952f0:/src/generic/prntdlgg.cpp diff --git a/src/generic/prntdlgg.cpp b/src/generic/prntdlgg.cpp index 6270c0f62f..10ab2dcf48 100644 --- a/src/generic/prntdlgg.cpp +++ b/src/generic/prntdlgg.cpp @@ -125,7 +125,7 @@ wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, Init(parent); } -void wxGenericPrintDialog::Init(wxWindow *parent) +void wxGenericPrintDialog::Init(wxWindow * WXUNUSED(parent)) { // wxDialog::Create(parent, -1, _("Print"), wxPoint(0, 0), wxSize(600, 600), // wxDEFAULT_DIALOG_STYLE | wxDIALOG_MODAL | wxTAB_TRAVERSAL); @@ -242,7 +242,10 @@ void wxGenericPrintDialog::OnOK(wxCommandEvent& WXUNUSED(event)) wxThePrintSetupData->SetPrinterFile(f); } else + { + m_printDialogData.GetPrintData().SetPrintMode(wxPRINT_MODE_PRINTER); wxThePrintSetupData->SetPrinterMode(wxPRINT_MODE_PRINTER); + } EndModal(wxID_OK); } @@ -265,6 +268,7 @@ void wxGenericPrintDialog::OnRange(wxCommandEvent& event) void wxGenericPrintDialog::OnSetup(wxCommandEvent& WXUNUSED(event)) { + *wxThePrintSetupData = m_printDialogData.GetPrintData(); wxGenericPrintSetupDialog *genericPrintSetupDialog = new wxGenericPrintSetupDialog(this, wxThePrintSetupData); int ret = genericPrintSetupDialog->ShowModal(); @@ -354,7 +358,8 @@ TODO: collate and noCopies should be duplicated across dialog data and print dat wxDC *wxGenericPrintDialog::GetPrintDC() { - return new wxPostScriptDC(wxThePrintSetupData->GetPrinterFile(), FALSE, (wxWindow *) NULL); + // return new wxPostScriptDC(wxThePrintSetupData->GetPrinterFile(), FALSE, (wxWindow *) NULL); + return new wxPostScriptDC(GetPrintDialogData().GetPrintData()); } // ----------------------------------------------------------------------------