]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/printps.cpp
PCX handler now working for reading (8bit and 24bit images).
[wxWidgets.git] / src / generic / printps.cpp
index 599715179f94b0089afb94407ec96649f3e8c743..ec2b99b5d3b3a31c80b24c51542a042f02081d99 100644 (file)
@@ -30,6 +30,8 @@
 
 #include "wx/defs.h"
 
+#if wxUSE_PRINTING_ARCHITECTURE
+
 #ifndef WX_PRECOMP
     #include "wx/utils.h"
     #include "wx/dc.h"
@@ -43,6 +45,7 @@
 #include "wx/dcprint.h"
 #include "wx/printdlg.h"
 #include "wx/generic/prntdlgg.h"
+#include "wx/generic/progdlgg.h"
 #include "wx/paper.h"
 
 #include <stdlib.h>
@@ -168,7 +171,7 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro
     wxBeginBusyCursor();
 
     int
-       pagesPerCopy = maxPage-minPage+1,
+       pagesPerCopy = m_printDialogData.GetToPage()-m_printDialogData.GetFromPage()+1,
        totalPages = pagesPerCopy * m_printDialogData.GetNoCopies(),
        printedPages = 0;
     // Open the progress bar dialog
@@ -177,9 +180,8 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro
        _("Printing..."),
        totalPages,
        parent,
-       /* disable parent only */ true,
-       /* show abort button */ true);
-    
+       wxPD_CAN_ABORT|wxPD_AUTO_HIDE|wxPD_APP_MODAL);
+
     printout->OnBeginPrinting();
 
     bool keepGoing = TRUE;
@@ -217,10 +219,11 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro
                }
                else
                {
-                  sm_abortIt = true;
-                  keepGoing = false;
+                  sm_abortIt = TRUE;
+                  keepGoing = FALSE;
                }
             }
+           wxYield();
         }
         printout->OnEndDocument();
     }
@@ -347,3 +350,4 @@ void wxPostScriptPrintPreview::DetermineScaling()
     }
 }
 
+#endif