#include "wx/gtk/private.h"
+#ifdef __UNIX__
#include <unistd.h> // chdir
+#endif
//-----------------------------------------------------------------------------
// "clicked" for OK-button
const wxPoint& pos,
const wxSize& WXUNUSED(sz),
const wxString& WXUNUSED(name))
+{
+ Create(parent, title, defaultPath, style, pos);
+}
+
+bool wxDirDialog::Create(wxWindow* parent,
+ const wxString& title,
+ const wxString& defaultPath,
+ long style,
+ const wxPoint& pos,
+ const wxSize& WXUNUSED(sz),
+ const wxString& WXUNUSED(name))
{
m_message = title;
wxDefaultValidator, wxT("dirdialog")))
{
wxFAIL_MSG( wxT("wxDirDialog creation failed") );
- return;
+ return false;
}
GtkWindow* gtk_parent = NULL;
if ( !defaultPath.empty() )
gtk_file_chooser_set_current_folder( GTK_FILE_CHOOSER(m_widget),
- defaultPath.fn_str() );
+ wxGTK_CONV_FN(defaultPath) );
+
+ return true;
}
void wxDirDialog::OnFakeOk(wxCommandEvent& WXUNUSED(event))
if (wxDirExists(dir))
{
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(m_widget),
- dir.fn_str());
+ wxGTK_CONV_FN(dir));
}
}