X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/937013e0fd914d4c42f9f5ec98da665986b93dfa..3da9cffc79cd41b5f1d0c517c8c945596751e86f:/src/gtk/fontdlg.cpp diff --git a/src/gtk/fontdlg.cpp b/src/gtk/fontdlg.cpp index 50f971d756..8ad18f9eca 100644 --- a/src/gtk/fontdlg.cpp +++ b/src/gtk/fontdlg.cpp @@ -86,7 +86,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog) bool wxFontDialog::DoCreate(wxWindow *parent) { - parent = GetParentForModalDialog(parent); + parent = GetParentForModalDialog(parent, 0); if (!PreCreation( parent, wxDefaultPosition, wxDefaultSize ) || !CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, @@ -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), @@ -128,7 +129,7 @@ bool wxFontDialog::DoCreate(wxWindow *parent) else { // this is not supposed to happen! - wxFAIL_MSG(_T("font is ok but no native font info?")); + wxFAIL_MSG(wxT("font is ok but no native font info?")); } } @@ -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__