]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/fontdlg.cpp
fixes #10358
[wxWidgets.git] / src / gtk / fontdlg.cpp
index 50f971d7567d468367a417729e4c92c9091adeea..a1df8d00e544016679f80b02aff4b44271a6d47b 100644 (file)
@@ -98,6 +98,7 @@ bool wxFontDialog::DoCreate(wxWindow *parent)
 
     wxString m_message( _("Choose font") );
     m_widget = gtk_font_selection_dialog_new( wxGTK_CONV( m_message ) );
+    g_object_ref(m_widget);
 
     if (parent)
         gtk_window_set_transient_for(GTK_WINDOW(m_widget),
@@ -141,7 +142,7 @@ wxFontDialog::~wxFontDialog()
 
 void wxFontDialog::SetChosenFont(const char *fontname)
 {
-    m_fontData.SetChosenFont(wxFont( wxString::FromAscii(fontname) ));
+    m_fontData.SetChosenFont(wxFont( wxString::FromUTF8(fontname) ));
 }
 
 #endif // wxUSE_FONTDLG && !__WXGPE__