X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a1abca322fd7a9a7abe6cc0b144987786faa0f05..39931206f721e7da71c94995b842f9e4c4e18505:/src/gtk/dirdlg.cpp diff --git a/src/gtk/dirdlg.cpp b/src/gtk/dirdlg.cpp index 699f568fcb..16bd7a83fe 100644 --- a/src/gtk/dirdlg.cpp +++ b/src/gtk/dirdlg.cpp @@ -97,7 +97,8 @@ wxDirDialog::wxDirDialog(wxWindow* parent, const wxString& title, if (!gtk_check_version(2,4,0)) { m_message = title; - m_needParent = false; + + parent = GetParentForModalDialog(parent); if (!PreCreation(parent, pos, wxDefaultSize) || !CreateBase(parent, wxID_ANY, pos, wxDefaultSize, style, @@ -147,7 +148,7 @@ wxDirDialog::wxDirDialog(wxWindow* parent, const wxString& title, if ( !defaultPath.empty() ) gtk_file_chooser_set_current_folder( GTK_FILE_CHOOSER(m_widget), - wxConvFileName->cWX2MB(defaultPath) ); + defaultPath.fn_str() ); } else wxGenericDirDialog::Create(parent, title, defaultPath, style, pos, sz, name); @@ -191,7 +192,8 @@ void wxDirDialog::SetPath(const wxString& dir) { if (wxDirExists(dir)) { - gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(m_widget), wxConvFileName->cWX2MB(dir)); + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(m_widget), + dir.fn_str()); } } else @@ -203,7 +205,7 @@ wxString wxDirDialog::GetPath() const if (!gtk_check_version(2,4,0)) { wxGtkString str(gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(m_widget))); - return wxConvFileName->cMB2WX(str); + return wxString(str, *wxConvFileName); } return wxGenericDirDialog::GetPath();