From: Mart Raudsepp Date: Mon, 31 Jul 2006 00:35:08 +0000 (+0000) Subject: Don't use filename encoding conversion when passing string to gtk_file_chooser_set_cu... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f0f1afb8b98fc4160025529a471d635ce09ff8ce?ds=sidebyside Don't use filename encoding conversion when passing string to gtk_file_chooser_set_current_name (save as dialog suggested filename) - it takes a UTF-8 per gtk+ documentation and common sense, so use wxGTK_CONV instead. Fixes wxFileDialog save mode default filename with non-utf8 G_FILENAME_ENCODING (bug #1497800). Thanks to Konstantin Anory for pointing this out. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40388 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/filedlg.cpp b/src/gtk/filedlg.cpp index e407cae561..256220854e 100644 --- a/src/gtk/filedlg.cpp +++ b/src/gtk/filedlg.cpp @@ -228,7 +228,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, wxConvFileName->cWX2MB(defaultDir)); gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(m_widget), - wxConvFileName->cWX2MB(defaultFileName)); + wxGTK_CONV(defaultFileName)); #if GTK_CHECK_VERSION(2,7,3) if ((style & wxFD_OVERWRITE_PROMPT) && !gtk_check_version(2,7,3)) @@ -401,7 +401,7 @@ void wxFileDialog::SetFilename(const wxString& name) if (!gtk_check_version(2,4,0)) { if (HasFlag(wxFD_SAVE)) - gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(m_widget), wxConvFileName->cWX2MB(name)); + gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(m_widget), wxGTK_CONV(name)); else SetPath(wxFileName(GetDirectory(), name).GetFullPath()); }