X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03647350fc7cd141953c72e0284e928847d30f44..8a31648287be0ef976f133de2786b137f1e98340:/src/gtk/filepicker.cpp diff --git a/src/gtk/filepicker.cpp b/src/gtk/filepicker.cpp index 2b0f7fca9e..f457717e8a 100644 --- a/src/gtk/filepicker.cpp +++ b/src/gtk/filepicker.cpp @@ -129,6 +129,14 @@ void wxFileButton::SetPath(const wxString &str) UpdateDialogPath(m_dialog); } +void wxFileButton::SetInitialDirectory(const wxString& dir) +{ + if (m_dialog) + DoSetInitialDirectory(static_cast(m_dialog), dir); + else + wxGenericFileButton::SetInitialDirectory(dir); +} + #endif // wxUSE_FILEPICKERCTRL && defined(__WXGTK26__) @@ -274,4 +282,15 @@ void wxDirButton::SetPath(const wxString& str) UpdateDialogPath(m_dialog); } +void wxDirButton::SetInitialDirectory(const wxString& dir) +{ + if (m_dialog) + { + if (m_path.empty()) + static_cast(m_dialog)->SetPath(dir); + } + else + wxGenericDirButton::SetInitialDirectory(dir); +} + #endif // wxUSE_DIRPICKERCTRL && defined(__WXGTK26__)