- return gtk_file_chooser_set_filename( m_widget,
- wxConvFileName->cWX2MB( path.c_str() ) );
+ // set the initial file name and/or directory
+ const wxString dir = fn.GetPath();
+ return gtk_file_chooser_set_current_folder( m_widget,
+ dir.utf8_str() ) != 0;
+ }
+
+ case GTK_FILE_CHOOSER_ACTION_OPEN:
+ return gtk_file_chooser_set_filename( m_widget, path.utf8_str() ) != 0;
+
+ case GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER:
+ case GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER:
+ break;
+ }
+
+ wxFAIL_MSG( "Unexpected file chooser type" );
+
+ return false;