Always use UTF-8 for file names passed to GTK+ functions under MSW.

When building wxGTK under MSW, always use UTF-8 as file name encoding because
GTK+ doesn't use G_FILENAME_ENCODING there.

Add a helper wxGTK_CONV_FN() macro to hide the difference between the
platforms.

Closes #14035.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-04-08 18:10:29 +00:00
parent 527f168b34
commit c282e47d8f
8 changed files with 29 additions and 12 deletions

View File

@@ -362,7 +362,7 @@ bool wxGtkFileCtrl::Create( wxWindow *parent,
if ( !dir.empty() )
{
gtk_file_chooser_set_current_folder( m_fcWidget,
dir.fn_str() );
wxGTK_CONV_FN(dir) );
}
const wxString fname = fn.GetFullName();
@@ -371,7 +371,7 @@ bool wxGtkFileCtrl::Create( wxWindow *parent,
if ( !fname.empty() )
{
gtk_file_chooser_set_current_name( m_fcWidget,
fname.fn_str() );
wxGTK_CONV_FN(fname) );
}
}
else // wxFC_OPEN
@@ -379,7 +379,7 @@ bool wxGtkFileCtrl::Create( wxWindow *parent,
if ( !fname.empty() )
{
gtk_file_chooser_set_filename( m_fcWidget,
fn.GetFullPath().fn_str() );
wxGTK_CONV_FN(fn.GetFullPath()) );
}
}