X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/09a094552238443f82cb12a105bf88f3ca5b83a3..ff9bb105a0dfd89a5c2691743466494380e85505:/src/gtk/gnome/gprint.cpp?ds=sidebyside diff --git a/src/gtk/gnome/gprint.cpp b/src/gtk/gnome/gprint.cpp index d9e20d0662..6c947a9664 100644 --- a/src/gtk/gnome/gprint.cpp +++ b/src/gtk/gnome/gprint.cpp @@ -717,7 +717,8 @@ bool wxGnomePrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt ) { gs_lgp->gnome_print_job_close( job ); g_object_unref (job); - sm_lastError = wxPRINTER_ERROR; + if (sm_lastError != wxPRINTER_CANCELLED) + sm_lastError = wxPRINTER_ERROR; return false; } @@ -856,7 +857,7 @@ wxGnomePrintDC::wxGnomePrintDC( wxGnomePrinter *printer ) m_signX = 1; // default x-axis left to right m_signY = -1; // default y-axis bottom up -> top down - + GetSize( NULL, &m_deviceOffsetY ); } @@ -881,8 +882,8 @@ wxGnomePrintDC::wxGnomePrintDC( const wxPrintData& data ) m_currentGreen = 0; m_signX = 1; // default x-axis left to right - m_signY = -1; // default y-axis bottom up -> top down - + m_signY = -1; // default y-axis bottom up -> top down + GetSize( NULL, &m_deviceOffsetY ); } @@ -1717,7 +1718,7 @@ wxCoord wxGnomePrintDC::GetCharWidth() const void wxGnomePrintDC::DoGetTextExtent(const wxString& string, wxCoord *width, wxCoord *height, wxCoord *descent, wxCoord *externalLeading, - wxFont *theFont ) const + const wxFont *theFont ) const { if ( width ) *width = 0; @@ -1939,7 +1940,7 @@ void wxGnomePrintPreview::DetermineScaling() m_previewPrintout->SetPPIPrinter(wxGnomePrintDC::GetResolution(), wxGnomePrintDC::GetResolution()); wxSize sizeDevUnits(paper->GetSizeDeviceUnits()); - + // TODO: get better resolution information from wxGnomePrintDC, if possible. sizeDevUnits.x = (wxCoord)((float)sizeDevUnits.x * wxGnomePrintDC::GetResolution() / 72.0);