]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/gnome/gprint.cpp
corrected bitmap mask -> Image conversion
[wxWidgets.git] / src / gtk / gnome / gprint.cpp
index 4bdc4076a0f8bbe7eb7436dd19fe2dedd5512cca..45e9735ad302ea59fbb8d85cc91a6dff867d73d3 100644 (file)
@@ -22,8 +22,7 @@
 
 #if wxUSE_LIBGNOMEPRINT
 
-#include "math.h"
-
+#include "wx/math.h"
 #include "wx/fontutil.h"
 #include "wx/printdlg.h"
 #include "wx/gtk/private.h"
 #include <libgnomeprintui/gnome-print-job-preview.h>
 #include <libgnomeprintui/gnome-print-paper-selector.h>
 
+
+#include "wx/html/forcelnk.h"
+FORCE_LINK_ME(gnome_print)
+
 //----------------------------------------------------------------------------
 // wxGnomePrintLibrary
 //----------------------------------------------------------------------------
@@ -792,7 +795,7 @@ wxDC* wxGnomePrinter::PrintDialog( wxWindow *parent )
     int ret = dialog.ShowModal();
     if (ret == wxID_CANCEL)
     {
-        sm_lastError = wxPRINTER_ERROR;
+        sm_lastError = wxPRINTER_CANCELLED;
         return NULL;
     }
     
@@ -1412,9 +1415,9 @@ void wxGnomePrintDC::DoGetTextExtent(const wxString& string, wxCoord *width, wxC
     pango_layout_get_pixel_size( m_layout, &w, &h );
     
     if (width)
-        *width = (wxCoord) w
+        *width = (wxCoord)(w / m_scaleX)
     if (height)
-        *height = (wxCoord) h;
+        *height = (wxCoord)(h / m_scaleY);
     if (descent)
     {
         PangoLayoutIter *iter = pango_layout_get_iter(m_layout);