X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/74ab5f5b9df928c75c119a2c00b0d2092caa49f1..1f9f790f56bc7d6fede09f95b3fb7655f80ed149:/src/gtk/filectrl.cpp?ds=sidebyside diff --git a/src/gtk/filectrl.cpp b/src/gtk/filectrl.cpp index c8b852d36d..c79d27d3bc 100644 --- a/src/gtk/filectrl.cpp +++ b/src/gtk/filectrl.cpp @@ -369,18 +369,13 @@ bool wxGtkFileCtrl::SetDirectory( const wxString& dir ) bool wxGtkFileCtrl::SetFilename( const wxString& name ) { - if ( !gtk_check_version( 2, 4, 0 ) ) + if ( HasFlag( wxFC_SAVE ) ) { - if ( HasFlag( wxFC_SAVE ) ) - { - gtk_file_chooser_set_current_name( m_fcWidget, wxGTK_CONV( name ) ); - return true; - } - else - return SetPath( wxFileName( GetDirectory(), name ).GetFullPath() ); + gtk_file_chooser_set_current_name( m_fcWidget, wxGTK_CONV( name ) ); + return true; } - - return false; + else + return SetPath( wxFileName( GetDirectory(), name ).GetFullPath() ); } void wxGtkFileCtrl::SetWildcard( const wxString& wildCard ) @@ -422,7 +417,8 @@ void wxGtkFileCtrl::GetFilenames( wxArrayString& files ) const void wxGtkFileCtrl::ShowHidden(bool show) { - gtk_file_chooser_set_show_hidden(m_fcWidget, show); + // gtk_file_chooser_set_show_hidden() is new in 2.6 + g_object_set (G_OBJECT (m_fcWidget), "show-hidden", show, NULL); } #endif