X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6305f044a1d4cce68128529fa939a2cc1d35df85..7d6a4d96961eac84d05db8bb24c64d39003f6e54:/src/gtk/filectrl.cpp diff --git a/src/gtk/filectrl.cpp b/src/gtk/filectrl.cpp index eec4ce2a7a..70cd51acbd 100644 --- a/src/gtk/filectrl.cpp +++ b/src/gtk/filectrl.cpp @@ -47,7 +47,7 @@ wxString wxGtkFileChooser::GetPath() const wxGtkString str( gtk_file_chooser_get_filename( m_widget ) ); wxString string; - if (str.c_str() != NULL) + if (str) string = wxString::FromUTF8(str); return string; } @@ -88,7 +88,7 @@ bool wxGtkFileChooser::SetPath( const wxString& path ) if ( path.empty() ) return true; - return gtk_file_chooser_set_filename( m_widget, path.utf8_str() ); + return gtk_file_chooser_set_filename( m_widget, path.utf8_str() ) != 0; } bool wxGtkFileChooser::SetDirectory( const wxString& dir ) @@ -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()) ); } }