#include "wx/defs.h"
+#if wxUSE_PRINTING_ARCHITECTURE
+
#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/dc.h"
// Create an abort window
wxBeginBusyCursor();
+ int
+ pagesPerCopy = m_printDialogData.GetToPage()-m_printDialogData.GetFromPage()+1,
+ totalPages = pagesPerCopy * m_printDialogData.GetNoCopies(),
+ printedPages = 0;
// Open the progress bar dialog
wxProgressDialog *progressDialog = new wxProgressDialog (
printout->GetTitle(),
_("Printing..."),
- maxPage-minPage,
- parent,
- /* disable parent only */ true,
- /* show abort button */ true);
+ totalPages,
+ parent );
printout->OnBeginPrinting();
else
{
wxString msg;
- msg.Printf(_("Printing page %d..."), pn);
- if(progressDialog->Update(pn-minPage, msg))
+ msg.Printf(_("Printing page %d..."), printedPages+1);
+ if(progressDialog->Update(printedPages++, msg))
{
dc->StartPage();
printout->OnPrintPage(pn);
else
{
sm_abortIt = true;
- keepGoing = false; //FIXME: do we need both?
+ keepGoing = false;
}
}
}
- delete progressDialog;
printout->OnEndDocument();
}
printout->OnEndPrinting();
+ delete progressDialog;
wxEndBusyCursor();
}
}
+#endif