Compilation fix for STL build after r65830.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 16 Oct 2010 23:05:15 +0000 (23:05 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 16 Oct 2010 23:05:15 +0000 (23:05 +0000)
Explicit conversion from wxString to "const char *" is needed in STL build.
And even in non-STL build it's wrong to rely on implicit conversion as it
wouldn't work correctly in non-UTF-8 locales.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65833 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/print.cpp

index 2c3376d044d413b2936eaf82aa55be0eea51c281..5bbd55a7b58474c72bf70c28c01a8fca67190532 100644 (file)
@@ -543,7 +543,7 @@ bool wxGtkPrintNativeData::TransferFrom( const wxPrintData &data )
         default:                break;
     }
 
-    gtk_print_settings_set_printer(m_config, data.GetPrinterName());
+    gtk_print_settings_set_printer(m_config, data.GetPrinterName().utf8_str());
 
     return true;
 }
@@ -763,7 +763,9 @@ int wxGtkPageSetupDialog::ShowModal()
     wxString title(GetTitle());
     if ( title.empty() )
         title = _("Page Setup");
-    GtkWidget *dlg = gtk_page_setup_unix_dialog_new(title, GTK_WINDOW(m_parent->m_widget));
+    GtkWidget *
+        dlg = gtk_page_setup_unix_dialog_new(title.utf8_str(),
+                                             GTK_WINDOW(m_parent->m_widget));
 
     gtk_page_setup_unix_dialog_set_print_settings(
         GTK_PAGE_SETUP_UNIX_DIALOG(dlg), nativeData);