]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/prntdlgg.cpp
1. wxMSW seems to work (please test and send your bug reports!)
[wxWidgets.git] / src / generic / prntdlgg.cpp
index 6270c0f62f811b2ec1cc103b762bc68147cd7ffd..10ab2dcf4828086a7247cb7ce6787ce8ca5f3c56 100644 (file)
@@ -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());
 }
 
 // ----------------------------------------------------------------------------