X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c7a49742ec6b4effe012dc7204db307e1267bf6a..4e15d1caa03346c126015019c1fdf093033ef40b:/src/gtk/gnome/gprint.cpp diff --git a/src/gtk/gnome/gprint.cpp b/src/gtk/gnome/gprint.cpp index 807477e2e0..17888b8a6d 100644 --- a/src/gtk/gnome/gprint.cpp +++ b/src/gtk/gnome/gprint.cpp @@ -34,6 +34,7 @@ #include "wx/dynlib.h" #include "wx/paper.h" #include "wx/dcprint.h" +#include "wx/testing.h" #include #include @@ -591,6 +592,8 @@ wxGnomePrintDialog::~wxGnomePrintDialog() int wxGnomePrintDialog::ShowModal() { + WX_TESTING_SHOW_MODAL_HOOK(); + int response = gtk_dialog_run (GTK_DIALOG (m_widget)); if (response == GNOME_PRINT_DIALOG_RESPONSE_CANCEL) @@ -609,7 +612,9 @@ int wxGnomePrintDialog::ShowModal() m_printDialogData.SetNoCopies( copies ); m_printDialogData.SetCollate( collate ); - switch (gs_libGnomePrint->gnome_print_dialog_get_range( (GnomePrintDialog*) m_widget )) + // Cast needed to avoid warnings because the gnome_print_dialog_get_range() + // is declared as returning a wrong enum type. + switch ( static_cast( gs_libGnomePrint->gnome_print_dialog_get_range( (GnomePrintDialog*) m_widget ))) { case GNOME_PRINT_RANGE_SELECTION: m_printDialogData.SetSelection( true ); @@ -734,6 +739,8 @@ wxPageSetupDialogData& wxGnomePageSetupDialog::GetPageSetupDialogData() int wxGnomePageSetupDialog::ShowModal() { + WX_TESTING_SHOW_MODAL_HOOK(); + wxGnomePrintNativeData *native = (wxGnomePrintNativeData*) m_pageDialogData.GetPrintData().GetNativeData(); @@ -1594,11 +1601,8 @@ void wxGnomePrinterDCImpl::DoDrawRotatedText(const wxString& text, wxCoord x, wx const wxScopedCharBuffer data(text.utf8_str()); - size_t datalen = strlen(data); - pango_layout_set_text( m_layout, data, datalen); - - const bool - setAttrs = wxGTKPrivate::SetPangoAttrsForFont(m_font, m_layout, datalen); + pango_layout_set_text(m_layout, data, data.length()); + const bool setAttrs = m_font.GTKSetPangoAttrs(m_layout); if (m_textForegroundColour.IsOk()) {