X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/87138c520ce5dc4d0268191074866e8bc300c984..006162a9e9312a07bb118db7e16d42ffeb110c87:/src/generic/prntdlgg.cpp diff --git a/src/generic/prntdlgg.cpp b/src/generic/prntdlgg.cpp index 6270c0f62f..526a4df7a6 100644 --- a/src/generic/prntdlgg.cpp +++ b/src/generic/prntdlgg.cpp @@ -65,18 +65,21 @@ // wxWin macros // ---------------------------------------------------------------------------- +#if !USE_SHARED_LIBRARY + #if wxUSE_POSTSCRIPT -#if !USE_SHARED_LIBRARY IMPLEMENT_CLASS(wxGenericPrintDialog, wxDialog) IMPLEMENT_CLASS(wxGenericPrintSetupDialog, wxDialog) - IMPLEMENT_CLASS(wxGenericPageSetupDialog, wxDialog) BEGIN_EVENT_TABLE(wxGenericPrintDialog, wxDialog) EVT_BUTTON(wxID_OK, wxGenericPrintDialog::OnOK) EVT_BUTTON(wxPRINTID_SETUP, wxGenericPrintDialog::OnSetup) EVT_RADIOBOX(wxPRINTID_RANGE, wxGenericPrintDialog::OnRange) END_EVENT_TABLE() +#endif + + IMPLEMENT_CLASS(wxGenericPageSetupDialog, wxDialog) BEGIN_EVENT_TABLE(wxGenericPageSetupDialog, wxDialog) EVT_BUTTON(wxPRINTID_SETUP, wxGenericPageSetupDialog::OnPrinter) @@ -89,6 +92,8 @@ extern wxPrintPaperDatabase *wxThePrintPaperDatabase; +#if wxUSE_POSTSCRIPT + // ============================================================================ // implementation // ============================================================================ @@ -125,7 +130,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 +247,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 +273,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 +363,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()); } // ----------------------------------------------------------------------------